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
The easiest solution is to add a string containing a space into your print statement: print "hello, " + FirstName + " " + LastName
You could always just add a comma instead of the space or +: print "hello", firstname, lastname. Should work.
Thanks for the help. Now that I look at it, I see the mistakes that I made. Now on to problem set 1!
Join our real-time social learning platform and learn together with your friends!