-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathif.py
More file actions
93 lines (72 loc) · 1.77 KB
/
if.py
File metadata and controls
93 lines (72 loc) · 1.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
request_topping = 'mushrooms'
if request_topping != 'anchovis':
print("Hold the anchovis")
answer = '17'
if answer != '42':
print("That is not a correct answer. Please try again")
age = '19'
age <= '21'
age < '21'
age >= '21'
age > '21'
age_0 = '21'
age_1 = '18'
age_0 >= '21' and age_1 >= '21'
age_1 = '22'
age_0 >= '21' and age_1 >= '21'
age_0 = '22'
age_1 = '18'
age_0 >= '21' or age_1 >= '21'
age_0 = '18'
age_0 >= '21' or age_1 >= '21'
requested_toppings = ['cheese', 'pineapple', 'meat']
'cheese' in requested_toppings
'pepperoni' in requested_toppings
banned_users = ['andrew', 'carolina', 'david']
user = 'marie'
if user not in banned_users:
print(user.title() + ", you can post a response if you wish.")
car = 'subaru'
print("Is car == 'subaru'? I predict True.")
print(car == 'subaru')
print("\nIs car == 'audi'? I predict False.")
print(car == 'audi')
candy_box = '12'
candy_box < '13'
candy_box > '13'
candy_box == '13'
candy_box != '13'
candy_box <= '13'
candy_box >= '13'
candy = 'choclate'
print("Is candy == 'choclate' write True")
print(candy == 'choclate')
print("\nIs car == lolly_pop write False")
print(candy == 'lolly_pop')
car = 'vaz'
car == 'vaz'
car == 'bmv'
motocycle = 'Yamaha'
motocycle.lower() == 'yamaha'
computer = 'hp'
if computer != 'dell':
print("ti che kuku?")
answer = '32'
if answer != '21':
print("you socks")
age_0 = '22'
age_1 = '19'
age_0 >= '21' and age_1 >= '21'
age_1 = '22'
age_0 >= '21' and age_1 >= '21'
(age_0 >= '21') and (age_1 >= '21')
age_1 = '19'
age_0 >= '21' or age_1 >= '21'
age_0 >= '21' or age_1 >= '21'
item_list = ['strong', 'clever', 'brave']
'thick' in item_list
'strong' in item_list
black_list = ['egor', 'vita', 'vana']
user = 'maria'
if user not in black_list:
print(user.title() + " You are welcome!")