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!

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 Python Basics (2015) Logic in Python The Exception to the Rule

Eric Ouellette
Eric Ouellette
3,332 Points

The Exception to the Rule

When I do the write the code of the last example and enter a letter, let say 'a' without the quotes instead of a number I should get "That's not a number!" by I get an error saying that 'a' is not defined.

Any ideas ?

2 Answers

it would be clear if you can show your codes

James J. McCombie
.a{fill-rule:evenodd;}techdegree seal-36
James J. McCombie
Python Web Development Techdegree Graduate 21,140 Points

if you enter a without quotes, the interpreter will process that as a variable name, if you have not set a variable a and assigned it something, you will see the error saying a is not defined