Computer Science I for majors by James Tam |
Due Friday May 26 at 5 PM
Login to your UNIX account*
Start a script session *
In your current location make a new directory called '231'
Enter the 231 directory.
Show your location (path) in the UNIX file system.
Go to the official course directory for CPSC 231 (/home/231)
Go to the directory for the CPSC 231 Assignment 1 (/home/231/assignments/assignment1)
Display the contents of the file called 'index.txt' onscreen (JT's hint for this step: don't try to view it with an editor such as 'NEdit' or 'vi').
Try to delete the 'index.txt' file [JT's Hint: you aren't supposed to be able to complete this step successfully but instead you should get an error message. Take away learning: you only have limited file permissions in the course directory]
Copy the 'index.txt' file to the newly created '231' directory that you created in your home directory
Go to the '231' directory that is located in your home directory
Show the contents of the '231' directory. (It should include the file 'index.txt' now.)
Delete the 'index.txt' file from your 231 directory [JT's comment: it should work now because it's a directory that you created rather than the course directory]
Show the contents of the '231' directory. (The file should be gone now).
End the script session*
Submit your assignment (the file called "typescript" 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 on a step in Part I or no credit. You don't need to include contact information in the typescript (partly because some of it will be displayed in Step #4 but mostly because you will be including this information in Part II).
Write a Python program that will calculate your term grade point based on the weights specified in the course admin notes, summary in the following PDF. The program will prompt the user for the grade point for each component and calculate the weighted grade point for that component. Note: just like with your actual term grade each component will be awarded a value from 0 - 4.0 GPA (some will allow for 'bonus' marks of up to 4.3 GPA). However your program does not have to error check that the user actually entered a value within this range because you will not yet have yet learned how to do this yet. Just assume that the user enters a value within the correct range. Also your program doesn't have to check for invalid types of information being entered (e.g. the user enters a string instead of numbers for a grade point). You should however document these things as current program limitations.