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

I'm doing problem set 0. My code looks like this: # Problem Set 0 >>> # Name: john Doe >>> # Time: 1:00 >>> # >>> print raw_input(" Enter your last name: ") Enter your last name: >>> last = raw_input >>> print raw_input(" Enter your first name: ") Enter your first name: >>> first = raw_input >>> print (first) >>> print (last) I'm using python 2.7.2 and save the code as ps0.py but when i try to run the program a command box quickly flashes on my screen then disappears

OpenStudy (shriram):

isn't it raw_input( ) ? http://docs.python.org/library/functions.html#raw_input

OpenStudy (anonymous):

You are not using the Idle I don't think. You have opened a screen into which you can type stuff and the top says Shell and it has some options in the tool bar. Go to those options and go to file new window. Write in there, go to run module.

OpenStudy (anonymous):

After you find that, then I will help you with the code.

OpenStudy (anonymous):

ok Joz, BCwa (if you see this) we should really make a video or screen capture tutorial about going from shell to workspace. second in case the documentation isn't clear you don't need to put print in front of raw_input <variable> = raw_input("<stuff you want to appear on screen>") third that command line box is how python scripts run without IDLE, if your on windows, right click and "edit with idle" OR go into IDLE and open it using the open dialog boxes forth you can stop the command line prompt from closing by adding raw_input("press enter to exit") to the end. this makes the program wait for human input before closing. that last part was less useful then the other three, but its fun to know

OpenStudy (anonymous):

Nessman, that is a most excellent idea. I made my very first tutorial... let me know what you think! http://screencast.com/t/MTrBO0BfdlSC

OpenStudy (anonymous):

not bad, that is going to cut down a pile of questions on this board for the future

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!
Latest Questions
nikkixmarie: how do you write a rough draft essay?
2 minutes ago 11 Replies 3 Medals
Dabi: What Are Newton's laws of physics?
17 minutes ago 6 Replies 2 Medals
LaylaSanaii: Help me pls
15 minutes ago 3 Replies 0 Medals
nikenike: In two to four sentences, explain economies of scale.
35 minutes ago 0 Replies 0 Medals
4waldo: how many miles is Highway 11?
34 minutes ago 2 Replies 0 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!