Write a python program to display following series using iterative statements in python?
10
100
1000
10000
Answers
Answered by
1
As we mentioned earlier, the Python for loop is an iterator based for loop.
for <variable> in <sequence>:
<statements>
else:
<statements>
The items of the sequence object are assigned one after the other to the loop variable; to be precise the variable points to the items. For each item the loop body is executed.
Example of a simple for loop in Python:
>>> languages = ["C", "C++", "Perl", "Python"]
>>> for x in languages:
... print(x)
...
C
C++
Perl
Python
>>>
Similar questions
Biology,
1 month ago
English,
1 month ago
English,
3 months ago
Math,
3 months ago
Social Sciences,
9 months ago