Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 22 Online
OpenStudy (anonymous):

Hey everyone, I'm on the first homework problem and I have a question. The code I have looks like this... x = raw_input('What is your date of birth? ') y = raw_input('What is your last name? ') print (y + x) Everything goes but when it prints there are no spaces between the two pieces of input data. In other words it winds up looking like this. Smith4/24/1985 I'm missing something really simple to get the space in there, I just don't know what it is. Can anyone point me in the right direction?

OpenStudy (anonymous):

nvm, figured it out :O

OpenStudy (anonymous):

print y,"(a space)",x the print statement prints only what you ask it to, nothing more nothing less. A space is treated as a string (like all the letters in the alphabet) so it's like expecting the computer to print the value of y without mentioning y in your print statement.

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!