Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 36 Online
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
ARTSMART: Art!
1 hour ago 4 Replies 3 Medals
Jasonisyours: What were the key causes of the French Revolution in 1789?
2 hours ago 2 Replies 4 Medals
PureSoulless: Why is the word "Pedophile" always censored in yt vids?
1 day ago 3 Replies 0 Medals
Jalli: What's 58x3634u00b07
19 hours ago 6 Replies 3 Medals
arriya: who wanna play roblox
1 day ago 5 Replies 1 Medal
brianagatica14: Any artist on here?
3 days ago 7 Replies 2 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!