r/pythonhelp • u/jamesfarted09 • Dec 03 '20
Python Syntax Errors
Hi!
I was practicing some pretty easy scripts and all it does is see what a number is and print 'big' or 'small'. so can anyone tell me what the problem is?
x = 5
if x = 5 :
print('big')
if x = 1 :
print('small')
print('done!')
Also im using Pyscripter as an IDE
2
Upvotes
1
u/scoopulanang Dec 04 '20
It could be indentation but if statements require a double equal sign instead of a single one. For instance,
Double equal signs is a comparison operator. It compares both values on either side of the operator to see if they are equal. The single equal sign assigns a value to something.
We assigned a value of 5 to x.