Python Forum
Basic If statement - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Basic If statement (/thread-17928.html)



Basic If statement - tinsr - Apr-29-2019

Can someone help me figure out what is wrong with the following basic if statement:
------------------------------
>>> Nums=input("Number:")
Number:41
>>> R=int(Nums)%2
>>> R
1
>>> If R>0:

SyntaxError: invalid syntax
------------------------------

The invalid syntax is referring to the R in R>0


RE: Basic If statement - perfringo - Apr-29-2019

Your if starts with capital letter.


RE: Basic If statement - tinsr - Apr-29-2019

Thanks! That worked. I'm a newbie. It's the details that are getting me so far.