lundi 27 juin 2016

Python IF statement Error [duplicate]

This question already has an answer here:

What am I doing wrong in this IF statement Gives me an NameError: Name "stop" is not defined

Obviously, I am an novice. Would appreciate any advice.

Been searching the net - unfortunately no luck

usrinput = input("enter play/stop/next: ")

if usrinput == "play":
    print("play")
elif usrinput == "next":
    print("next")
    music_next()
elif usrinput == "stop":
    print("stop")
    music_stop()
else:
    exit()

Aucun commentaire:

Enregistrer un commentaire