-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathex29.py
More file actions
34 lines (25 loc) · 830 Bytes
/
ex29.py
File metadata and controls
34 lines (25 loc) · 830 Bytes
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
people = 20
cats = 30
dogs = 15
if people < cats:
# 20 is lesser than 30, so this would run
print("Too many cats! The world is doomed!")
if people > cats:
# 20 is lesser than 30, so this wouldn't run
print("Not many cats! The world is saved!")
if people < dogs:
# 20 is greater than 15, so this wouldn't run
print("The world is drooled on!")
if people > dogs:
# 20 is greater than 15, so this would run
print("The world is dry!")
dogs += 5
if people >= dogs:
# 20 is equal to 20, so this would run
print("People are greater than or equal to dogs.")
if people <= dogs:
# 20 is equal to 20, so this would run
print("People are less than or equal to dogs.")
if people == dogs:
# 20 is equal to 20, so this would run
print("People are dogs.")