Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #recruitment in the army - PYTHON
- from datetime import date
- print('-=-=' * 10)
- print(' RECRUITMENT IN THE ARMY!')
- print('-=-=' * 10)
- birthYear = int(input('Date of birth? '))
- currentYear = date.today().year #ano atual
- calculateAge = (currentYear-birthYear)
- year2 = (18-calculateAge)
- year3 = (calculateAge-18)
- color = {'green' : '\033[4;32m', 'nothing' : '\033[m', 'red' : '\033[4;31m', 'yellow' : '\033[4;33m'}
- if calculateAge < 18:
- print('{}You are {} years old, {} year(s) away from enlistment!{}'.format(color['green'], calculateAge, year2, color['nothing']))
- elif calculateAge == 18:
- print('{}You are {} years old, its time to enlist, please report to the battalion!{}'.format(color['yellow'],calculateAge, color['nothing']))
- elif calculateAge > 18:
- print('{}You are {} years old, {} year(s) has passed since your enlistment period!{}'.format(color['red'], calculateAge, year3, color['nothing']))
- #by Estéfani =D
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement