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

I have just started this course and on problem set 0 it keeps printing out the same line twice. "print raw_input('What is your last name? ')" then it asks it again before going to the next line. Please help :(

OpenStudy (anonymous):

This is code: print 'What is your last name? ' x = raw_input ('What is your last name? ') print ' What is your date of birth? ' y = raw_input (' What is your date of birth? ') print 'Name: ' +x, 'Born: ' +y Here is what happens when I run module: What is your last name? What is your last name? Michel What is your date of birth? What is your date of birth? June 3rd Name: Michel Born: June 3rd

OpenStudy (anonymous):

What language is this?

OpenStudy (anonymous):

python

OpenStudy (anonymous):

When using input you can also give a directive. Remove the sentence from input to correct this or remove the print statement.

OpenStudy (anonymous):

Thank you very much. I understand what happened now.

OpenStudy (anonymous):

I did the same thing... Had both print and raw_input statements, when you don't need the print statements at all...

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!