Repository navigation
Expand file tree
/
Copy pathif_2.py
More file actions
128 lines (112 loc) · 2.77 KB
/
Copy pathif_2.py
File metadata and controls
128 lines (112 loc) · 2.77 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
age = 63
if age < 4:
price = 0
elif age < 18:
price = 5
elif age < 65:
price = 10
elif age >= 65:
price = 5
print("You admission cost is $" + str(price) + ".")
requested_toping =['cheese', 'mushrooms']
if 'mushrooms' in requested_toping:
print("adding mushrooms.")
if 'pepperoni' in requested_toping:
print("adding pepperoni")
if 'cheese' in requested_toping:
print("adding cheese")
print("\nFinished making you pizza!")
alien_color = ['yellow', 'green', 'red']
if 'green' in alien_color:
print("Congratulations! You win 5 points!")
alien_color = ['yellow', 'green', 'red']
if 'black' in alien_color:
print("Congratulations! You win 5 points!")
alien_color = ['yellow', 'green', 'red']
if 'green' in alien_color:
print("Congratulations! You win 15 points!")
else:
print("You loose!")
alien_color = ['yellow', 'green', 'red']
if 'black' in alien_color:
print("You loose")
else:
print("Congratulations! You win 10 points!")
alien_color = ['yellow', 'green', 'red']
if 'green' in alien_color:
print("Congratulations! You win 100 points!")
else:
print("You loose!")
alien_color = ['yellow', 'green', 'red']
if 'green' in alien_color:
print("Congratulations you win 120 points!")
elif 'black' in alien_color:
print("Ha ha ha ")
else:
print("I'm happy!")
alien_color = ['yellow', 'green', 'red']
if 'black' in alien_color:
print("Congratulations you win 120 points!")
elif 'green' in alien_color:
print("Ha ha ha ")
else:
print("I'm happy!")
alien_color = ['yellow', 'green', 'red']
if 'black' in alien_color:
print("Congratulations you win 120 points!")
elif 'orange' in alien_color:
print("Ha ha ha ")
else:
print("I'm happy!")
age = 5
if age < 2:
life = 'socker'
elif age <= 1 :
life = 'good'
else:
life = 'You happy'
print("You are " + str(life) + ".")
age = 5
if age <= 4:
life = 'baby'
elif age < 13:
life = 'babyin'
else:
life = 'is good'
print("You are " + str(life) + ".")
age = 14
if age <= 13:
life = 'boy'
elif age < 20:
life = 'bboy'
else:
life = 'is good'
print("You are " + str(life) + ".")
age = 21
if age <= 20:
life = 'man'
elif age < 65:
life = 'big man'
else:
life = 'old man'
print("You are " + str(life) + ".")
age = 66
if age <= 65:
life = 'Too short'
elif age > 64:
life = 'a little'
else:
life = 'is good'
print("You are " + str(life) + ".")
my_fruits = ['apple', 'kivi', 'pineaple']
if 'apple' in my_fruits:
print("You really like apple!")
if 'kivi' in my_fruits:
print("You really like kivi!")
if 'pineaple' in my_fruits:
print("You really like pineaple!")
if 'banana' in my_fruits:
print("You really like banana!")
if 'peach' in my_fruits:
print("You really like peach!")
print("\nThis is you favorite fruits!")