Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Solution: Age limit

age = float(input('Please type in your age: '))
if 21 <= age:
    print('You can already drink alcohol. In the USA as well.')
elif 18 <= age:
    print('You can already drink alcohol. (But not in the USA.)')
else:
    print('You cannot legally drink alcohol.')