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

OpenStudy is now Brainly!

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

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

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

anonymous

5 years ago

//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

anonymous

5 years ago

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.