anonymous
  • anonymous
Regarding problem set 0: I was able to do the problem set more or less no problem but I wasn't sure how to include a space between my outputs... x = raw_input('What is your date of birth?') y = raw_input ('What is your last name?') print y+x
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 :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
jamiebookeater
  • jamiebookeater
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
lopus
  • lopus
print x,"",y
anonymous
  • anonymous
print x, y
anonymous
  • anonymous
you should learn how to use the `%` in string. That will be useful the. For your question: `print "%s %s" % (x, y)` whenever the computer sees `%` it will look at the tuple and replace `%` by the element in the same index. But remember you must use the `%` which is suitable with the element in the same index For example: `%s` for `string` `%i` for `int` (integer) More information: http://stackoverflow.com/questions/4480278/list-of-python-format-characters

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
or the str.format() method http://docs.python.org/library/string.html#format-string-syntax
anonymous
  • anonymous
Thanks for the help!

Looking for something else?

Not the answer you are looking for? Search for more explanations.