Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

SSully

  • one year 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
    • one year ago
    Best Response
    You've already chosen the best response.
    Medals 0

    nvm, figured it out :O

  2. michaelokt
    • one year 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

Ask a Question
Find more explanations on OpenStudy

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.