# operadores matemáticos
a = 3 + 5 - 6 * 10 / 5 # 4
b = a ** 0.5 # 2
c = 11 % 5 # 1
d = 7 // 5 # 1
# operadores lógicos
true and false # false
true or false # true
not true # false
# operadores de comparação: >, <, >=, <=, ==, !=
cubos > google # true
# outros
1 in [1, 2, 3] # true
# condicionais
nota = 6
if nota >= 5:
print("Passou")
elif nota >= 4.5:
print("Porra, sério que não te aproximaram?")
else
print("Perdeu :(")
# loops
conhecimento = 0
while conhecimento < 100:
# estudar
conhecimento += 10
print("Agora eu vou brocar!")
# loops #2
for i in range(5):
print(i)
# saída: 0, 1, 2, 3, 4
a = 0
def askOk(question):
print(question + " (s/n)")
return input() == "s"
while askOk("Posso continuar?"):
a += 1
print(a)