I am trying to do the first problem of name and birthdate. I am having trouble with printing the responses. Is anyone working on this?
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
What's the problem you're having?
So this is what I did:
I gave a name to the stuff that I wanted to get from the user - for date of birth, I just called it "DoB". I then said:
DoB = raw_input("Please enter your date of birth >..."")
What this does is prints a prompt using the words in quotations, and waits for the user to enter the info and hit return.
It's printed it out using:
print "You entered your date of birth as: ", DoB.
Same idea for last name, amended to suit.
oops; just noticed that I closed the raw_input string with two lots of quotation marks; that's just my fat thumbs; sorry! Just open and close with one lot of quotes :)