[Python #6] create e33.py
This commit is contained in:
parent
f49854866e
commit
9f5cedcc4f
2 changed files with 21 additions and 0 deletions
19
kjg/python-the-hard-way/e33.py
Normal file
19
kjg/python-the-hard-way/e33.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
i = 0
|
||||
numbers = []
|
||||
|
||||
test = 7
|
||||
|
||||
#while i < test:
|
||||
for i in range(0, test):
|
||||
print(f"At the top i is {i}")
|
||||
numbers.append(i)
|
||||
|
||||
i = i + 2
|
||||
print("Numbers now: ", numbers)
|
||||
print(f"At the bottom i is {i}")
|
||||
|
||||
|
||||
print("The numbers: ")
|
||||
|
||||
for num in numbers:
|
||||
print(num)
|
|
@ -124,3 +124,5 @@ How to use if, elif
|
|||
*** Python #6
|
||||
**** ex32
|
||||
How to use for-loop
|
||||
**** ex33
|
||||
How to use while-loop
|
||||
|
|
Loading…
Reference in a new issue