Jump to content

Don't laugh.... (python)

Go to solution Solved by Nuluvius,
bigNumberA = 100000bigNumberB = 100001count_to = bigNumberA + bigNumberBprint count_to

Output:

200001

I just decided to check out codeacademy because i wanted to learn some programming.

And when i reached question 10 on the tutorial...

It keeps returning NameError: name 'count_to' is not defined

 

Could someone give me a working example?

====>The car thread<====>Dark Souls thread<====>Placeholder<====
"Life is like a raging river, Its gonna get rough downstream. And people's gonna piss in it" 

"Who discovered we could get milk from cows, and what did he THINK he was doing at the time?"

Link to comment
https://linustechtips.com/topic/182685-dont-laugh-python/
Share on other sites

Link to post
Share on other sites

I just decided to check out codeacademy because i wanted to learn some programming.

And when i reached question 10 on the tutorial...

It keeps returning NameError: name 'count_to' is not defined

 

Could someone give me a working example?

try search on google

Link to comment
https://linustechtips.com/topic/182685-dont-laugh-python/#findComment-2455163
Share on other sites

Link to post
Share on other sites

What's the question itself? I've never used it, so I don't have an account.

pyton_zps55052224.png

====>The car thread<====>Dark Souls thread<====>Placeholder<====
"Life is like a raging river, Its gonna get rough downstream. And people's gonna piss in it" 

"Who discovered we could get milk from cows, and what did he THINK he was doing at the time?"

Link to comment
https://linustechtips.com/topic/182685-dont-laugh-python/#findComment-2455199
Share on other sites

Link to post
Share on other sites

bigNumberA = 100000bigNumberB = 100001count_to = bigNumberA + bigNumberBprint count_to

Output:

200001

Thank you  :) This has been driving me nuts for the past half hour.. 

====>The car thread<====>Dark Souls thread<====>Placeholder<====
"Life is like a raging river, Its gonna get rough downstream. And people's gonna piss in it" 

"Who discovered we could get milk from cows, and what did he THINK he was doing at the time?"

Link to comment
https://linustechtips.com/topic/182685-dont-laugh-python/#findComment-2455208
Share on other sites

Link to post
Share on other sites

It's giving you that error because you haven't defined a count_to variable. @Nuluvius's code should do it, but you should understand that it's giving you that error for that reason.

 

Something as simple as the following does it.

count_to = 10000 + 1000001;print count_to;

Want to solve problems? Check this out.

Link to comment
https://linustechtips.com/topic/182685-dont-laugh-python/#findComment-2455213
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×