Python Forum

Full Version: First Program, Syntax Issues
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please help. My first few lessons and attempt at python. Using Spyder (Python 3.7)

salary = 5000
If salary > 5000:
    print ("Approved")
Am getting the following error when running.
Error:
File "C:\Users\heetesh.j.bhoola\untitled15.py", line 9 If salary > 5000: ^ SyntaxError: invalid syntax
First, please use the python tags when posting code, otherwise indentation is lost. And, in Python, indentation is incredibly important.

Python is case sensitive. Change the If to if.