Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # código que fiz em 2017, acho
- while True:
- res = input("Sim ou não?\n").lower()
- if res.strip() == 'não' or res.strip() == 'nao' or res.strip() == 'sim':
- print('Deu certo')
- break
- if res == '':
- print('Você deve digitar algo.')
- elif res.strip() == '':
- print('Você não pode digitar apenas espaços.')
- else:
- print('Resposta inválida, digite novamente.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement