mercredi 3 février 2021

I am beginner and I have trying to learn to learn python so I have problem with this python code(if else statements) [closed]

At the line 6 I nested if else statement in the print statement and can you help with finding another solution for this

age = int(input('How old are you:' ));

 if age > 18:
    print('You are welcome to use our services');
else:
    print('sorry,we can\'t give you our services we can give this services after ' + str(18 
- age ) + str(
    if str(18 - age) = 1:
        print('year')
    else:
        print('years')
))

Aucun commentaire:

Enregistrer un commentaire