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

Good evening. I am new to programming and I am enjoying the MIT course.... So far. I am just looking to have a basic understanding of code and have the ability to write a little bit. I am trying a variation on PS0 that prints first and last name at the end, but I get them printed together as shown below. Any help is appreciated. questionLast = ('What is your last name?') questionFirst = ('What is your first name?') print questionLast LastName = raw_input() print questionFirst FirstName = raw_input() print "hello, " + FirstName + LastName) My result is : hello MattMorse

OpenStudy (anonymous):

The easiest solution is to add a string containing a space into your print statement: print "hello, " + FirstName + " " + LastName

OpenStudy (anonymous):

You could always just add a comma instead of the space or +: print "hello", firstname, lastname. Should work.

OpenStudy (anonymous):

Thanks for the help. Now that I look at it, I see the mistakes that I made. Now on to problem set 1!

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!
Latest Questions
Jasonisyours: any tips on how to get better at art
2 hours ago 6 Replies 3 Medals
zariahispretty: How Do I get my old account back if password not working
8 hours ago 9 Replies 1 Medal
Raye14: Why do people like to hurt me
2 hours ago 17 Replies 3 Medals
XQueenFAMARIX: WHO u choosing Polo G or LILTJAY ud83eudd14?
22 minutes ago 14 Replies 0 Medals
JuneTheAssasin2923: Does anyone know anything about literary analyisis papers?
9 hours ago 8 Replies 1 Medal
xEdwinX: what are peoples thoughts on suicide
9 hours ago 43 Replies 2 Medals
Limitless2: could someone please help me
12 hours ago 6 Replies 0 Medals
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!