Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Christopher John
seal-mask
.a{fill-rule:evenodd;}techdegree
Christopher John
Python Development Techdegree Student 275 Points

Traceback

Print("Hello, World")

Why does the above give you traceback?

print("Hello, World"

why doesn't this give you traceback?

print('Hello, World")

Why doesn't this give you traceback?

2 Answers

Chris Freeman
MOD
Chris Freeman
Treehouse Moderator 68,426 Points
  1. NameError β€œPrint” not defined. Should be lower case print
  2. SyntaxError missing closing paren
  3. SyntaxError mismatching quotation marks

Post back if you need more help. Good luck!!!

Chris Freeman
Chris Freeman
Treehouse Moderator 68,426 Points

A traceback or stacktrace is the Python interpreter giving you a source if the error. It can have many layers if the error occurred in a lower level function. A simple example:

>>> int('h')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: 'h'