-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path11116_Control_Flow_Statements.py
More file actions
263 lines (191 loc) · 6.09 KB
/
11116_Control_Flow_Statements.py
File metadata and controls
263 lines (191 loc) · 6.09 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# if condition1:
# execute body1
# else : # if condition1 is not ensured execute body2
# execute body2
# if True:
# print('it is true.')
# if ["Ali"]: # değer bakımından truety old. için koşulu sağlar
# print("it is true")
# grocery_store = True # True yerine 1, False yerine 0 da yazabiliriz
# minced_meat = True
# Hamburger_bread = True
# lettuce = True
# onion = True
# hamburger = grocery_store and minced_meat and (lettuce or onion) and Hamburger_bread
# if hamburger:
# print("Afiyet olsun")
# empty_seat = 54
# if empty_seat > 34:
# print("oldukça yerimiz mevcut")
# print(1 == 1)
# print("henry" = "henry")
# x = 6
# y = 9
# print ("is x equal to y? :" , x == y)
# print ("is x not equal to y? :" , x != y) # "!=" eşit değildir
# print ("is x less than y? :" , x < y)
# print ("is x greater than y? :" , x > y)
# print ("is x less than or equal to y? :" , x <= y)
# print ("is x greater than or equal to y? :" , x >= y)
# a = set("TWELVE PLUS TWON")
# b = set("TWELVE PLUS ONE")
# if a == b:
# print("we are the same")
# a = set("TWELVE PLUS TWON")
# b = set("TWELVE PLUS ONE")
# if a = type(str) and b = type(str)
# print("we are the same")
# if condition1:
# execute body1
# else : # if condition1 is not ensured execute body2
# execute body2
# course = 'clarusway'
# if course == "clarusway":
# print("you guaranteed the job")
# else:
# print("think about it again")
# number = 5
# if number <= 3:
# print("Number is smaller than or equal to 3")
# else: # Optional clause (you can only have one else)
# print("Number is bigger than 3")
# number = 49
# if number <= 72:
# print(f"{number} is smaller than or equal to 72")
# else: # Optional clause (you can only have one else)
# print(f"{Number} is bigger than 72")
# number = (input("enter a number"))
# if number % 2 == 0:
# print(f"{number} is even.")
# else:
# print(f"{number} is odd.")
# number = float(input("enter a number"))
# if number % 2 == 0:
# print(f"{number} is even.")
# else:
# print(f"{number} is odd.")
# number = int(input("enter a number: "))
# if number > 0:
# print(f"{number} is positive.")
# elif number < 0:
# print(f"{number} is negative.")
# else:
# print(f"{number} is neither negative nor positive")
# number1 = int(input("enter a number1"))
# number2 = int(input("enter a number2"))
# if number1 > number2:
# print(f"{number1} is larger than {number2}")
# else:
# print(f"{number2} is larger than {number1}")
# a = int(input("Enter Number: "))
# b = int(input("Enter Number: "))
# if a > b:
# print(f"The large number is: {a}")
# elif a == b:
# print(f"{a} is the equel {b}")
# else:
# print(f"The large number is: {b}")
# number1 = int(input("enter a number-1: "))
# number2 = int(input("enter a number-2: "))
# number3 = int(input("enter a number-2: "))
# if number1 > number2 and number1 > number3:
# print(f"{number1} is the largest: ")
# elif number2 > number1 and number2 > number3:
# print(f"{number2} is the largest: ")
# elif number3 > number1 and number3 > number2:
# print(f"{number3} is the largest: ")
# else:
# print("Get lost")
# audience = "baby"
# if audience == "kid":
# if audience == "kid":
# print("it is free to go to cinema")
# elif audience == "teen":
# print("discounted price!")
# else: # audience == "adult":
# print("normal price")
# else:
# print("No such audience, stay at your home!")
# audience_group = ["kid", "teen", "adult"]
# audience = "kid"
# if audience in audience_group:
# if audience == "kid":
# print("free to go to cinema")
# elif audience == "teen":
# print("discounted price!")
# else:print("normal price")
# else:
# print("no such audience")
# audience_group = ["kid", "teen", "adult"]
# audience = "kid"
# if audience in audience_group:
# if audience == "kid":
# print("free to go to cinema")
# elif audience == "teen":
# print("discounted price!")
# else:print("normal price")
# else:
# print("no such audience")
# score = int(input('Enter your score :'))
# if score >=90:
# if score >=95:
# Score_letter='A+'
# else:
# Score_letter='A'
# elif score >=80:
# if score >=85:
# Score_letter = 'B+'
# else:
# Score_letter = 'B'
# else:
# Score_letter = 'below B'
# print(f'Your degree: {Score_letter}')
# print ("Your degree: %s" % Score_letter)
# while ve loop konusu
####################################################################################################
# weight = 80
# if weight > 100:
# print("That's too heavy!")
# elif weight > 75:
# print("I can lift that!")
# else:
# print("That's too light!")
# audience = "baby"
# if audience == "kid":
# print("it is free to go to cinema")
# elif audience == "teen":
# print("discounted price!")
# elif audience == "adult":
# print("normal price")
# else:
# print("No such audience, stay at your home!")
# number = 23
# if number <= 9:
# print("The number is less than 10")
# else:
# print("The number is equal or greater than 10")
# audience_group = 'kid', 'teen', 'adult'
# audience = "baby"
# if audience in audience_group:
# if audience == "kid":
# print("it is free to go to cinema")
# elif audience == "teen":
# print("discounted price!")
# else: # audience == "adult":
# print("normal price")
# else:
# print("No such audience, stay at your home!")
# score = int (input("Enter your score :"))
# if score >= 90:
# if score >= 95:
# Score_letter="A+"
# else:
# Score_letter="A"
# elif score >= 80:
# if score >= 85:
# Score_letter="B+"
# else:
# Score_letter="B"
# else:
# Score_letter="below B"
# print ("Your degree: %s" % Score_letter)