Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Basic If statement
#1
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
Quote
#2
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" !
Quote
#3
Thanks! That worked. I'm a newbie. It's the details that are getting me so far.
Quote

Top Page

Forum Jump:


Users browsing this thread: 1 Guest(s)