Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 31 Online
OpenStudy (snoman523228):

exercise 2 of the first session gives me a "name error" stating that "x" is not defined. What am I doing wrong?

OpenStudy (e.mccormick):

Can you paste you code on dpaste or pastebin, or copy it here and put a ``` above and below it? The ` is on the same key as ~. That does code highlighting and allows peoper retention of tabs or spaces.

OpenStudy (anonymous):

There is a chance that you are defining/declaring the variable in wrong location, and if you want exact answer you should paste the code here

OpenStudy (snoman523228):

I tried to paste it here, but I couldn't even do that! 34*x^2 + 68*x - 510 is problem 2, but as soon as I hit enter I get that error.

OpenStudy (e.mccormick):

Well, did you define x as something?

OpenStudy (snoman523228):

I guess that's what I need to do. Now I really feel stupid!

OpenStudy (snoman523228):

What does the Bump button do?

OpenStudy (e.mccormick):

Push a question back up to the top. As for feeling stupid, a stupid person does not know when they need to ask for some help, so you are not stupid. =) You just did not know what it meant. Until you learn it, you are just uninformed, not stupid.

OpenStudy (snoman523228):

Thanks to everyone for the help. Doing this at work so don't have time to study the site. how do i give medals?

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!