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

hi. In problem set 0, when I run the module and enter date of birth, it doesn't move to the next command but the program keeps running. here is my code(python): print "What is your date of birth?" x = raw_input ("** ") print "What is your last name? " y = raw_input ("** ") print y + " " +x is there a character or command i am missing that moves the program forward after i enter the input? thanks in advance for any help!

OpenStudy (anonymous):

Nevermind! It works perfectly in Komodo. Is IDLE really just that sucky?

OpenStudy (anonymous):

I am a total noob but this is what I just typed and it seems to work in IDLE. a = str(raw_input('enter your last name: ')) b = str(raw_input('enter the month of your birth: ')) c = str(raw_input('enter the day of your birth: ')) d = str(raw_input('enter the year of your birth: ')) print a, b+'/'+c+'/'+d

OpenStudy (anonymous):

hmmm. your code did the same thing that mine did. wont work in IDLE but works in Komodo. something isn't right. at least our code is correct! thanks for the reply. I will try reinstalling it.

OpenStudy (anonymous):

rmac362, your program worked as expected for me on my Python(v2.5.4)/IDLE(1.2.4) installation. This was not intuitive to me either when I first started either. Try this out and lemma know how it goes... When using the Python Shell, you need to enter your code line-by-line into IDLE. If you want to run all lines at once, choose File>>New Window to open a blank file. Then put your code into that 'Untiled' editor window, choose File>>Save and name it ps0.py. Now from the Run menu choose Run Module.

OpenStudy (anonymous):

I see someone beat me to it. But here is what I wrote for you. "I think you might not be using the IDLE Text Editor. I didn't see any documentation or clarification but this is what I did. Open IDLE, select File/New Window, then type your program there. Save your work as a .py file and then hit F5 to run the script. Let me know if this helps. See attachments."

OpenStudy (anonymous):

thanks for the replys. i have been using the text editor. the program works up to the point the user hits enter after entering date of birth and stalls. this happens only in idle. works perfectly in the komodo IDE.

OpenStudy (anonymous):

This is odd. I just tested your script and it worked for me too. Can you verify that you are using python 2.5.4? See attachment

OpenStudy (anonymous):

yes. 2.5.4/IDLE 1.2.4. reinstalling did not fix either.

OpenStudy (anonymous):

Would you like to try it on a virtual machine and see if it works there? I can easily set one up and provide the login details. You could then put your code there and see if it runs properly. That would help isolate the problem.

OpenStudy (anonymous):

Thanks for the offer. I actually ran my code on another machine that is running windows 7 and it worked. maybe it just doesn't like windows 8? either way i am just going to use a different IDE if i continue to have issues.

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!