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

Hi everyone, on Assignment #1, can anyone type up a solution for me? I just can't figure out how to get my first and last name to pop up. My current code is: >>> print raw_input('What is your first name? ') n = raw_input('What is your first name?') print raw_input('What is your last name? ') m = raw_input('What is your last name?') print (n, m) The result I get is it only prompts me for my first name and prints out my first name, and it ignores anything else I put underneath.

OpenStudy (anonymous):

Sorry, I meant Assignment #0, actually

OpenStudy (anonymous):

Your probably trying to enter your code into the shell, in which case I would recommend pressing, Ctrl-N, to create a proper window. Rembrandt: Right now, the shell is for running, not writing code. BTW, your code would also produce each statement twice, try removing the prints, because the raw_input already prints its promt. n = raw_input('What is your first name? ') m = raw_input('What is your last name? ') print n, m Happy Coding =)

OpenStudy (anonymous):

don't use the python shell instead click on file to open new window and then try this code http://dpaste.com/779882/

OpenStudy (anonymous):

however, the shell is an excellent place to try things out to see how they work http://dpaste.com/779921/

OpenStudy (anonymous):

Thanks, you guys are awesome

OpenStudy (anonymous):

int n int m n = raw_input('What is your first Name?') m = raw_input('What is your last Name?') print(n, m)

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!