-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwhile_1.py
More file actions
85 lines (75 loc) · 1.74 KB
/
while_1.py
File metadata and controls
85 lines (75 loc) · 1.74 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
curent_number = 1
while curent_number <= 5:
print(cdd)
curent_number += 1
prompt = "\nTell me something, and I will repeat it back to you:"
prompt += "\nEnter 'quit' to end the program. "
message = ""
while message != 'quit':
message = input(prompt)
print(message)
if message != 'quit':
print(message)
prompt = "\nTell me something, and I will repeat it back to you:"
prompt += "\nEnter 'quit' to end the program. "
active = True
while active:
message = input(prompt)
if message == 'quit':
active = False
else:
print(message)
prompt = "\nPlease enter the name of a city you have visited:"
prompt += "\n(Enter 'quit' when you are finished.) "
while True:
city = input(prompt)
if city == 'quit':
break
else:
print("I'd love to go to " + city.title() + "!")
curent_number = 0
while curent_number < 10:
curent_number += 1
if curent_number %2 == 0:
continue
print(curent_number)
x = 1
while x <= 5:
print(x)
x += 1
# Бесконечный цикл!
#x = 1
#while x <= 5:
# print(x)
pizza = "\nPlease insert youre topping"
pizza += " or press 'quit'"
print(pizza)
message = ""
while message != 'quit':
message = input(pizza)
print(message)
age = input("\nPlease insert youre age " )
age = int(age)
print(age)
if age <= 3:
print("You cost on the ticket is: free!")
elif age >= 12:
print("You cost on the ticket is: 15!")
else:
print("You cost on the ticket is: $10")
pizza = "\nPlease insert youre topping"
pizza += " or press 'quit' "
print(pizza)
message = ""
active = message
active = True
while active != 'quit':
active = input(pizza)
print(message)
if active == 'quit':
active = False
else:
print(pizza)
x = 2
while x <= 5:
print(cdd