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

I am trying to do Problem set 0. When I try to run my program it only runs first line. It prompts me to put in my DOB and I do but then it won't ask next question.

OpenStudy (turingtest):

could you please post your code?

OpenStudy (e.mccormick):

Hmmm.... does it do this as you are typing it in, or do you get done, try to run it, and it does not?

OpenStudy (anonymous):

what does the error say? yeah you have to post the code on here!

OpenStudy (anonymous):

I fixed the original problem but now I am just having trouble getting the user response to print... raw_input('Enter your date of birth:') raw_input('Enter your last name:') x = raw_input('Enter your last name:') y = raw_input('Enter your date of birth:') print x + y I originally did not define x and y variables and just put print raw_input('Enter your last name:') + y = raw_input('Enter your date of birth:') but this caused the program to prompt twice for the input and then print.

OpenStudy (anonymous):

I had this same issue at first... I think the thing is you don't need to print 'raw_input'. This code worked for me: x = raw_input ("What is your first name? ") y = raw_input ("What is your last name? ") print x, y

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!