I am going to be posting my solutions for the OpenCourseWare class 6.00. I don't expect that these solutions are the best or that they are perfect, but as far as I know they are all valid answers to the problems put before me. There are several that could probably be optimized or improved fairly easily by an experienced coder, but as I explained in my last post, I am a very mediocre programmer. These problems are the first steps on my path to become better.
ps0.py
#Gets first and last name as input
#prints both names using concatenation
lastName = raw_input("Enter your last name: ")
firstName = raw_input("Enter your first name: ")
print(firstName + ' ' + lastName)
Edited 5 Nov, 2010 -- Updated the code formatting
What language are you coding this in?
ReplyDeleteC++?
It's python. A lot of the syntax is similar to C though.
ReplyDelete