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

Hello everyone! I've just joined the course and don't feel confident about the assignment 0. Could you please check the script I came up with? >>> question = 'Enter your date of birth' >>> print(question) Enter your date of birth >>> date = raw_input() Enter your date of birth >>> question2 = 'enter your last name' >>> print(question2) enter your last name >>> name = raw_input() print(name,date)

OpenStudy (rsmith6559):

This is a copy and paste of the Python shell. Use a plain-text editor ( IDLE, Notepad, TextWrangler, TextEdit can do it be careful, vi) to put all the steps into a file. raw_input() can take a string to print as an argument, and it will return what the user enters as a string: foo = ( "Enter a value for foo: " ) print foo

OpenStudy (anonymous):

if you put the question inside the raw_input() brackets, the interpreter will prompt you that question! try it like this: date = raw_input('Enter your date of birth')

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!