Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Basic If statement
Can someone help me figure out what is wrong with the following basic if statement:
>>> Nums=input("Number:")
>>> R=int(Nums)%2
>>> R
>>> If R>0:

SyntaxError: invalid syntax

The invalid syntax is referring to the R in R>0
Your if starts with capital letter.
nilamo likes this post
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Life of Brian: Conjugate the verb, "to go" !
Thanks! That worked. I'm a newbie. It's the details that are getting me so far.

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)