Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

SSully

  • 3 years ago

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?

  • This Question is Open
  1. SSully
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    nvm, figured it out :O

  2. michaelokt
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    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.

  3. 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