Something is wrong with my code?
CodeGreen :: Programming :: Python :: Help!
Page 1 of 1 • Share •
Something is wrong with my code?
- Code:
choice = int(raw_input("What is your age "):
if choice <= 49:
print "Your not yet old"
elif choice >= 50:
print "Your old as hell"
else:
print "Invalid input"
I cant figure out whats wrong with it. It keeps giving me errors I'm not supposed to get please help

whOOper- Moderator

- Posts: 10
Reputation: 0
Join date: 2009-04-17
Age: 17
Re: Something is wrong with my code?
Moved to the Help! forum.
Always remember, if you're asking for help on a language,
ask in the language's help forum
Also, I found the problem in 5 seconds.
Look at this line:
You obviously put : instead of )
Observe your code a bit before you post.
Always remember, if you're asking for help on a language,
ask in the language's help forum
Also, I found the problem in 5 seconds.
Look at this line:
- Code:
choice = int(raw_input("What is your age "):
You obviously put : instead of )
Observe your code a bit before you post.

Xarver- Admin

- Posts: 32
Reputation: -1
Join date: 2009-04-17
Location: Somewhere

Re: Something is wrong with my code?
It is a common mistake, most other languages has syntax like that: if(TheFellow = UsingC){(Laugh);}

TheFellow- Forum Regular

- Posts: 26
Reputation: 0
Join date: 2009-04-18
Location: CyberSpace

Permissions of this forum:
You cannot reply to topics in this forum





