Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

KobeAsdrubal Group Title

//This is my code, It looks kind of complicated. I didn't think about using "X and Y" // My answer looks like ('Doe', '3/14/85') // I want to know why it put parentheses and commas. I just want it to print out the last name and date of birth question = "Enter your date of birth:" print (question) answer = raw_input() question = "Enter your last name:" print (question) response = raw_input() print (response, answer)

  • one year ago
  • one year ago

  • This Question is Open
  1. mwiegant Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    //You do java too? :D # You use the "#" symbol in python to comment out lines Ok, I am still pretty new to python, but here's the way I would change/rewrite your code: #this line has the exact same meaning of the first 3 lines of your code date_of_birth = raw_input("Enter your date of birth: ") #this has the same purpose as your next 3 lines, all combined into one last_name = raw_input("Enter your last name: ") #the way you had your print line worked fine, but this also will work print date_of_birth, last_name

    • one year ago
  2. KobeAsdrubal Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thank you so much!!! I do use a little java, i had to use it in my senior design project for college. I was just commenting out my questions so people would know lol but i did not know # was used for commenting in python. I am really new to this , I want to expand my knowledge in coding languages, that's why I am trying to learn python . Thanks again, I really appreciate it. That was so much easier to do the way you showed me.

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

    glad i could help :D

    • one year ago
  4. rsmith6559 Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    If you're running your code in Python v 2.x, I think that your print statement is making a tuple out of response and answer and then printing the tuple. It would be fun to try without the parentheses.

    • one year ago
    • Attachments:

See more questions >>>

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.