mercredi 18 mars 2020

New to Python, Python program is skipping over my nested if statement [closed]

fever = input(str('do you have a fever y/n? '))

asks for fever

if fever.lower() in ('yes','y'):
    level = int(input('what is your fever at '))
    if level >= 99:
            print:('go to the doctors')
    else:
            print('no fever')
else:
    print('you are fine')

if fever true ask for level of fever, if fever greater than 99 print go to doctors, otherwise print no fever.

Aucun commentaire:

Enregistrer un commentaire