VERY Basic Program -- Need Help

This is the place for queries that don't fit in any of the other categories.

VERY Basic Program -- Need Help

Postby mrstat » Wed Jan 15, 2014 4:29 am

Hey guys, here's a problem I'm having while trying to learn Python...

Code: Select all
#Write a program that asks for two numbers. If the sum of the numbers is greater than 100, print "That is a big number."
print("I want two numbers...")
number1 = int(input("First number: ")
number2 = int(input("Second number: ")             

if number1 + number2 > 100:
              print('That is a big number.")

For whatever reason, I get a syntax error when I try to run this program. I saved everything in the proper format (.py) and have no idea why this program fails to run. This is the error message:


Any help would be greatly appreciated! Thank you.
Last edited by micseydel on Wed Jan 15, 2014 5:03 am, edited 1 time in total.
Reason: First post lock.
Posts: 1
Joined: Wed Jan 15, 2014 4:23 am

Re: VERY Basic Program -- Need Help

Postby micseydel » Wed Jan 15, 2014 5:11 am

On line 3 you're missing a close parenthesis. Weird syntax errors are often a missing closing character, either a quote, paren, bracket or what have you.

Kudos for making a good first post by the way. The screenshot wasn't necessary but it didn't hurt!
Due to the reasons discussed here we will be moving to on October 1, 2016.

This forum will be locked down and no one will be able to post/edit/create threads, etc. here from thereafter. Please create an account at the new site to continue discussion.
User avatar
Posts: 3000
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: VERY Basic Program -- Need Help

Postby zeycus » Wed Jan 15, 2014 8:24 am

There is also a small problem with the last print. The string is written as:
Code: Select all
'That is a big number."

You opened it with one delimiter, and closed with the other, which is not legal. You can choose between the single or double quote for delimiting strings, but in the same string you need to be consistent.

Live long and prosper.
User avatar
Posts: 23
Joined: Sun Feb 17, 2013 10:30 am
Location: Madrid

Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot] and 11 guests