Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('Em qual turno você estuda?')
- is_int = True
- try:
- turno = int(input('(1) para Matutino, (2) para Vespertino e (3) para Noturno'))
- except Exception:
- is_int = False
- while not is_int:
- print('Caractere inválido, por favor digite uma letra')
- try:
- turno = int(input('(1) para Matutino, (2) para Vespertino e (3) para Noturno: '))
- is_int = True
- except Exception:
- is_int = False
- if turno == 1:
- print('Bom dia!')
- elif turno == 2:
- print('Boa tarde!')
- elif turno == 3:
- print('Boa noite!')
- else:
- print('Letra inválida')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement