vendredi 7 mai 2021

Can i print two statements with different conditions in a single if statement in python?

In this code if a person if greater than 80 he/she should be displayed with different statement whereas the one with age greater than 18 different but if possible without adding anymore if statements

if  80 > given > 18:
    print("you are eligible for voting")
else:
    print("you are not")

Aucun commentaire:

Enregistrer un commentaire