mercredi 7 juillet 2021

Python if statement gone wrong. Whats wrong? [duplicate]

I don't understand what's wrong with my code here. Can someone help me pls? I've been trying to solve it all morning.

question = input("Choose from 0 to 1 : ") 
mylist = ["Mark", "Jenny"] 
if question == 0: 
    print(mylist[0], "is your new friend") 
elif question == 1: 
    print(mylist[1], "is your new friend")
else:
    print("I said choose from 0 to 1")

Aucun commentaire:

Enregistrer un commentaire