Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 10 Online
OpenStudy (anonymous):

On exercise 1.5 - User input: I had no problem getting the correct output, but are we supposed to write it so that "John Doe was born on month day, year" is the output by assigning variables, or is there a way to make it use the answers to our raw_input(s) that we entered and make it print that statement?

OpenStudy (e.mccormick):

Can you link the problem? Then I can look at it.

OpenStudy (anonymous):

They asked for the user to input first and last name and their date of birth. It says the output should look like this: Enter your first name: Chuck Enter your last name: Norris Enter your date of birth: Month? March Day? 10 Year? 1940 Chuck Norris was born on March 10, 1940. And here's how I wrote mine: ##print "********** Exercise 1.5 **********" ## ##raw_input("Enter your first name:") ##raw_input("Enter your last name:") ##raw_input("Enter your date of birth:") ##raw_input("Month:") ##raw_input("Day:") ##raw_input("Year:") ## ##name_1 = "Seth" ##surname = "Holtz" ##mo = "February" ##day = "26" ##year = "1990" ## ##print name_1 + " " + surname + " " + "was " + "born " + "on " + mo + " " + day + ", " + year My print statement output was "Seth Holtz was born on February 26, 1990," like it was supposed to be, but I was wondering if there's a way to make the program print the words that are entered in the raw_input areas without having to assign them to variables. I'm probably just complicating things more than I need to.

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!