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

Im on problem set 0 as iv just started and it seems to be correct but a bit off and would like how I could fix it or make it better Code: print raw_input ("What is your date of birth") dbirth = raw_input ("07/09/94") print raw_input ("What is your last name") lname = raw_input ("Banez") print "Banez" + " " + "07/09/94" Output: What is your date of birth 07/09/94 What is your last name Banez Banez 07/09/94

OpenStudy (anonymous):

It looks like you're almost there, I think the goal here is to write a code that allows the user to input information, and then have the last line repeat the information by pulling it from the data that was inputted. In other words, you don't exactly want to write a code that already has the input data..the goal is so that anyone who runs the code can input their own unique answer. Here is a hint as to how your code should look: dbirth = raw_input ("what is your date of birth?") lname = raw_input ("what is your last name?") print lname + " " + dbirth when you run the code, the raw_input will prompt the user to enter information, once you enter your date of birth press enter, and do the same for lname. hope this helps!

OpenStudy (anonymous):

So i simply followed your exact code and it works. So thank you for that. Just one more quick question, I noticed when i put the print "etc" command it simply repeated it twice, should i just assume a print command in this situation is useless and only use those 3 lines of code

OpenStudy (rsmith6559):

Three lines are all that's needed.

OpenStudy (anonymous):

thank you very much for both the replies

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!
Latest Questions
gelphielvr: (algebra 1) arithmetic sequences question in the replies
15 seconds ago 1 Reply 0 Medals
gelphielvr: What animal never sleeps?
2 hours ago 2 Replies 1 Medal
gelphielvr: What 2 metals are liquid at room temperature?
1 hour ago 6 Replies 0 Medals
gelphielvr: What is the only planet not named after a god?
2 hours ago 4 Replies 0 Medals
Thayes1287: Please help me
4 hours ago 27 Replies 3 Medals
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!