Instructions a bit confusing on this one



<Below this line, add a link to the EXACT exercise that you are stuck at.>
<In what way does your code behave incorrectly? Include ALL error messages.>
File “python”, line 5
print count_to 100
SyntaxError: invalid syntax
<What do you expect to happen instead?>
I’m stuck on this exercise and completely confused. The last line below (count_to = 72 + 23) was my attempt to follow the instruction, however it failed. I just want to understand how to implement the following instruction:

  1. Set the variable count_to equal to the sum of two big numbers.

# Set count_to equal to the sum of two big numbers

print count_to 100
count_to = 72 + 23 


you have to set the variable first before printing it.

and here

print count_to 100

remove the number 100. It’s invalid.


Thank you very much. As soon as I came upon the Python Syntax Math exercise, the “print count_to 100” line was already included at the bottom (line 5 to be exact). I don’t know, maybe the exercise was trying to throw me off a little, but I admit I’m also new to programming, so bear with me if I seem a bit naive at the moment.

Anyway, I finally figured it out. I completely deleted the print count line and then attempted to enter the variable as you suggested and it worked. Thank you kindly for your help.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.