Don't understand lesson 7


#1

Hey, i dont understand lesson 7.
I write:
spam_variable = True
eggs_variable = False

and it doesnt come up an error message in the window, but it says:
Oops, try again. Did you define a variable called spam/eggs?
Help please?


#2

Hey, i dont really know how to delete the post, but i found out that i was not supposed to write _variable.


#3

you need to declare only the "eggs" not the "eggs_variable"


#4

I did that!!! same error


#5

Can anybody show me the whole indent please


#6

It should be like so:
spam = True
eggs = False

We are declaring two different variables here, both of which are Boolean data type, i.e. True or False. The variable names in Python are case sensitive.


#7

Thank you i handle it one more question why we didn t space at this time?


#8

def spam():
spam = True
return spam

print spam()

def eggs():
eggs = False
return eggs

print eggs()

I've tried this and I'm still getting the same message:

"Oops, try again. The variable spam should have the value True!"
is my spacing incorrect or is the variable for spam not define properly?
help plzzzzz


#9

ok so I simplied it and just type in what it was asking for
made it more complicated then i needed it too.
for anyone stuck here just follow satari's example exactly....and you'll get through this section. must follow the lesson plan verbatim


#10

hey guys please help me out in solving this activity.Iam getting the same error


#11

HELP

PYTHON has been fussy and the exercise is not working and all it gives are errors.

I have included a screen shot of it too.

The solution

select all of the code and deleat it


Then put in



spam = True
eggs = False


Now you are done


#12

Thanks! The key is to capitalize the 'T' in True and the 'F' in False


#13

hi,I think that you shouldn`t write _variable.


#14

I typed the code like below, and turned out it's corrct.
spam = True
eggs = False

The question is why don't I put FOUR WIGHTSPACE before spam and eggs?
This is not like way taught in lesson 1.6.