Python Forum

Full Version: Help with while loop
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm new to python working on a Raspberry pi. I'm trying to make a number guessing game based on user input.
Code:

num = int(raw_input("Pick a number: "))

While num != 4 :
     int(raw_input("Incorrect, pick again :)) #indented
else :
     print("Good job") #indented
     exit #indented
Error:
Error:
While num != 4 : ^ invalid syntax
python is case-sensitive
While is not the same as while