lundi 3 décembre 2018

Why do I keep getting "invalid syntax" for else statement?

The two functions above are working properly but for some reason the else statement breakes the build. Even without the "elses" function. Also is there any way to fit the else statement into the function? Neither does this work properly. This probably has some very easy fix but I am very new to this so I am thankful for all answers. Code below:

while True:
    action = input ()
    if action == "exit":
        deleyed_print("you leave the room ")
        print ("\n")
        break
    useless()
    looktwice()
    else:
        elses()

Aucun commentaire:

Enregistrer un commentaire