I'm getting a syntax error in Python and I'm not sure why?
I recently started learning Python and I'm trying to make a guess the number code. On line 12, it says that 'continue' isn't properly in the loop. Can someone explain to me what's going on and what I need to do to fix this, as from what I can see 'continue' is properly in the loop? Here's the code: from random import * print("Welcome to Guess the Number! The number will be between 1 and 100.") x = randint(1,100) a = int(input("Please enter your first guess (as digit/s):")) if a == x: print("Congratulations! Your guess is correct.") print("Enter 'run' to run the program again or 'quit' to quit the program") z = input(":") if z == "run": continue elif z == "quit": break else: print("Invalid input") break Also, what do you put after 'Invalid input'? At the moment I have 'break', but I'm not sure? And if you do happen to spot any other mistakes, please let me know. I'm very new to the programming world and I've only just started this code, so there's bound to be a lot of mistakes in it. Thanks for your time, and have a great day! :D