How to do Step 10 in learning PythonM


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/learn-python/lessons/python-syntax/exercises/math?action=lesson_resume
<In what way does your code behave incorrectly? Include ALL error messages.>
Traceback (most recent call last):
File “python”, line 5, in
NameError: name ‘count_to’ is not defined
<What do you expect to happen instead?>
It will work

```python

Set count_to equal to the sum of two big numbers

addition = 150 + 220

print count_to
count_to = 150 + 250

<do not remove the three backticks above>

#2

That does not define count_to; this does…

count_to = ....    # complete with your addition expression

#4

I tried just doing count_to = 150 + 200 .
It still wouldn’t work. Is it code academy or me?


#5

Be sure to print AFTER the assignment, not before.


#6

What do you mean by printing after the assignment?


#7

That’s what you have above. It should be the reverse. Assignment before accessing.

count_to = ...
print count_to

#8

Thank you so much! Why does print count_to go below the addition?


#9

Because it can’t print what is not already defined. The assignment is the definition, the print is the access. Trying to access a variable that is not yet defined will result in a parsing error.


#11