A matter of interpretation


#1


https://www.codecademy.com/en/courses/introduction-to-python-6WeG3/1/3


It is refusing to execute I think because of some error that am unable to identify.
Oops, try again.
Did you define a variable called eggs?


I expect it to return True


spam=True


#2

Hi
it is also asked to define a variable eggs which takes the value False
The error message is quite explicit on it


#3

One can only ask the same. What did you define?


#4

If I enter:
spam = true
eggs = false
I get error: Traceback (most recent call last):
File "python", line 1, in
NameError: name 'true' is not defined
If I enter:
spam = 3
eggs = false
I get error: Traceback (most recent call last):
File "python", line 2, in
NameError: name 'false' is not defined
So, I get the same error if I make the value of eggs 0, or blank, or -1.... I am not clear on what to enter here.


#5

In Python, boolean values are capitalized.


#6

Holy cannoli ... I wish the error would have said that from the start!
Note to self: Capitalize Boolean values!!
Thank you!


#9