-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path3-conditional_statement.py
More file actions
36 lines (34 loc) · 1.53 KB
/
3-conditional_statement.py
File metadata and controls
36 lines (34 loc) · 1.53 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
# Condicionais
sheep_conter = 15
start = 0
good_weather = True
good_restaurant = True
bad_weather = False
bad_restaurant = False
if start == 0: # Se start for igual a zero, vá para cama
print("Go to the bed")
#------------------------------------
if start >= sheep_conter: # Se 0 for maior ou igual a 15 ZzzzZzz (dormindo)
print("ZzzzzzzZZzz")
else:
print("Run away!") # Se não corra!
# -----------------------------------
if good_weather: # se o tempo estiver bom,
if good_restaurant: # Se o restaurante for bom,
print("huuum great food!") # Comer
else:
print(":x") # Se não, comida ruim
else: # se o tempo não estiver bom
if bad_restaurant: # se o restaurante não for bom
print("Watch TV! ") # Asista TV
else: # Se o restaurante for bom
print("Huuum great food") # Comer
# -----------------------------------
if good_weather: # Se o tempo estiver bom,
print("To Walk") # Caminhar
elif bad_restaurant: # Ou se o restaurante for ruim,
print ("Go to the home") # Vá para casa
elif start == sheep_conter: # Ou se start for igual a sheep_conter
print("Wake up") # Levante
else: # Se não
print("Search a good food") # Procure uma boa comida