Computer Science I for majors by James Tam |
Due Monday Sept 26 at 4 PM
Using a text editor (e.g. emacs) create a text file (ending in the suffix ".py") that will contain your Python program
Prompt the user for his/her name using the print() function (1 mark)
Get the user input with the input() function (1 mark)
Display the user input (suppose the user entered "Smiley" for the name) with a message concatenated onto the name enter by the user (either before or after the name or both) e.g. 1:"Smiley is a good name", e.g. 2:"I like you Smiley" (2 marks)
All the steps related to displaying & running a Python program refers to the program created in Part I
Login to your UNIX account*
Navigate to the directory where the Python program created in "Part I" was created*
Start a script session *
Using the UNIX 'cat' utility display the contents of the Python program. (1 mark)
Run the Python program using the 'python' command. (1 mark)
Show the program prompting for user input and display the modified string. (1 mark)
End the script session*
Submit the typescript file (no requirement to submit the Python program in this assignment because the marker can see it in the script although you can submit as well) using D2L as described on the course web page [D2L link]).*
The lines marked with a star '*' don't directly yield any marks but must still be completed in order for Part 1 of the assignment to be marked. You will either receive full marks for a step in Part I or no credit.
Mark 0 1 2 3 4 5 6 7 Assignment grade point 0 1.0 1.5 2.0 2.5 3 3.5 4.0