-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.2.FlowControl-loops.py
25 lines (22 loc) · 994 Bytes
/
2.2.FlowControl-loops.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
print("Loooooop")
inputString = int(input("Give me a number, any number, I will iterate that many times: "))
while inputString > 0:
print("Iterate step: ",inputString)
inputString -= 1
name = input("Please enter your name: ")
while name == '':
name = input("You didnt enter anything as your name, please do it: ")
else:
print("Thank you for entering your name: ",name)
option = int(input("If you would like to change the entery please press 1, or just press 0 if you are done"))
if option == 1 :
name = input("Please enter your name: ")
while name == '':
name = input("You didnt enter anything as your name, please do it: ")
else:
print("Thank you for entering your name: ",name)
option = int(input("If you would like to change the entery please press 1, or just press 0 if you are done"))
elif option == 0:
print("Final input of your name: ",name)
for variable in range(5):
print(variable)