dimanche 14 février 2021

Why is my code not probing me to the if or elif section?

The code below only skips me to the else: part...

print ("Welcome to my first program")
print ("Do you want to play my game ?")

x = "Start"
z = "Stop"

print("Options are: ")

print ("1",x)
print ("2",z)

Answer = input("Answer here: ")

a = Answer

if a = x :
    print (Answer,"So you want to play")

elif a = z :
     print (Answer,"So you do not want to play")

else :
     print ("Invalid entry...")
     print ("Try again next time.")

print ("Doneringo")

Aucun commentaire:

Enregistrer un commentaire