-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex041.py
More file actions
21 lines (19 loc) · 780 Bytes
/
Copy pathex041.py
File metadata and controls
21 lines (19 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from datetime import date
nasc = int(input('Digite o ano de nascimento do aluno: ').strip())
idade = date.today().year - nasc
#CATEGORIAS
mirim = range(0, 10)
infatil = range(10, 15)
junior = range(15, 20)
senior = 20
#CONDIÇÕES
if idade in mirim:
print('MIRIM. O aluno tem {} anos, então se encaixa nessa categoria.'.format(idade))
elif idade in infatil:
print('INFANTIL. O aluno tem {} anos, então se encaixa nessa categoria.'.format(idade))
elif idade in junior:
print('JUNIOR. O aluno tem {} anos, então se encaixa nessa categoria.'.format(idade))
elif idade == senior:
print('SENIOR. O aluno tem {} anos, então se encaixa nessa categoria.'.format(idade))
else:
print('MASTER. O aluno tem {} anos, então se encaixa nessa categoria.'.format(idade))