lundi 29 mars 2021

using elif to print whether a user has visited more than 2 continents but less than 6

the program says to print a response if the user has visited more than 2 continents but less than 6

continents = int(input("How many continents have you visited? "))

if continents >= 2:
    print("you've visited more than 2 continents.")
elif continents <= 6:
    print("you've visited less than 6 continents.")

Aucun commentaire:

Enregistrer un commentaire