A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • one year ago

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?

  • This Question is Open
  1. StephenCampbell
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Hey, Beth. What's the problem you're having?

  2. StephenCampbell
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    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.

  3. StephenCampbell
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 1

    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 :)

  4. e.mccormick
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    the joy of minor synax errors. While a human can take in " or "" with about the same utility, a computer will scream at you over such a minor issue. =)

  5. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.