Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class scanner:
- def __init__(self, valor):
- self.valor = valor
- def validar(self):
- if 12 >= self.valor > 1:
- if self.valor == 1:
- print('Janeiro')
- if self.valor == 2:
- print('Fevereiro')
- if self.valor == 3:
- print('Março')
- if self.valor == 4:
- print('Abril')
- if self.valor == 5:
- print('Maio')
- if self.valor == 6:
- print('Junho')
- if self.valor == 7:
- print('Julho')
- if self.valor == 8:
- print('Agosto')
- if self.valor == 9:
- print('Setembro')
- if self.valor == 10:
- print('Outubro')
- if self.valor == 11:
- print('Novembro')
- if self.valor == 12:
- print('Dezembro')
- else:
- print('Número invalido!')
Advertisement
Add Comment
Please, Sign In to add comment