Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python iterator


def iter(times):
    it = 1
    for i in range(times):
        its = it * 2
        it = its
    return it

while True:
    print()
    print(iter(int(input("how many iteration? : "))))
 
PREVIOUS NEXT
Tagged: #python #iterator
ADD COMMENT
Topic
Name
2+7 =