Introdução aos blocos de código + if / elif / else (condicionais)
This commit is contained in:
14
aula16.py
Normal file
14
aula16.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# if / elif / else
|
||||||
|
# se / se não se / se não
|
||||||
|
entrada = input('Você quer "entrar" ou "sair"? ')
|
||||||
|
|
||||||
|
if entrada == 'entrar':
|
||||||
|
print('Você entrou no sistema')
|
||||||
|
|
||||||
|
print(12341234)
|
||||||
|
elif entrada == 'sair':
|
||||||
|
print('Você saiu do sistema')
|
||||||
|
else:
|
||||||
|
print('Você não digitou nem entrar e nem sair.')
|
||||||
|
|
||||||
|
print('FORA DOS BLOCOS')
|
||||||
Reference in New Issue
Block a user