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

So I am just starting the class online... could someone help me to write my first program on assignment #0? I understand what the program should look like, but i'm not sure how to go about coding it.

OpenStudy (anonymous):

Hi, first you need to define two variables, "Last name" and "First name". For simplicity let's call them "lName" and "fName" respectively. Now, you want to be able to receive input from the user for those two variables which can be done as follows: http://pastebin.com/cXasVPGD In the code (see link above), "raw_input" will allow the users to input data into the program, which in this case is their last and first names. Besides, giving a string of instructions like "Enter your first name: " will tell the user what to do. Once the user inputs his last name and hits "Enter", the second line of code will be activated prompting the user to give his first name. After that the last line of the code, which is the print statement does its job (i.e. prints out the values associated with the variables "lName" and "fName"). The comma between "lName" and "fName" in the print statement acts as the space bar.

OpenStudy (anonymous):

sweet thanks so much... more questions to follow

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!
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!