To the faculty page of James Tam | Return to the course web page |
Due at 4 PM. For assignment due dates see the main schedule on the course webpage.
Only new concepts that need to be applied in the assignment are listed, concepts previously applied in other assignments may need to used in the implementation of your solution.
To get credit for this assignment you must use the starting code in the program '6creatingARandomList_listParameterAndReturn' (which should be covered in tutorial later this term but linked in here again for your convenience). Augment the starting program by adding two additional functions. You will awarded no credit if you don't define and use the existing functions and write new functions as specified because this assignment was designed to require you apply specific concepts associated with functional decomposition.
getFindAndReplaceCharacters(): prompts the user to enter two characters 'findChar' ,'replaceChar' (strings of length one) and returns them back to the caller which is the start() function. You can assume that the user entered strings of the correct length so your program doesn't need to verify. (Worth 1.0 GPA)
findAndReplace(): Takes the two characters entered by the user and traverses the list and replaces all instances of the "find character" with the "replacement character" in the list called 'aList'.(Worth 3.0 GPA) To get credit for this feature the program must call the display() function before calling this function as well as immediately afterward so the marker can quickly verify that your program is correct. [Example output showing the display of the list before and after the replacement].
Program functionality (implementing working program features)
Test your program: Because the assignment description (along with required features) is posted ahead of time if you test your program thoroughly before submitting the final version then you should get a pretty clear idea of "how you will do".
Although it won't affect your grade for mini-assignments you should still practice applying good style in your solution as well as writing documentation. It will keep your skills for the full assignments (when you will be graded on these things) and get you used to having good habits.
Naming the file containing your program: You must save your program in a file called "files1.py". Failing to use this exact name will affect your grade (-0.2 GPA).
Questions or concerns about grades after they have been released: Assignments will be marked by your tutorial instructor (the "Teaching Assistant" or "TA") for your tutorial section. When you have questions about marking this is the first person that you should be directing your questions towards. If you still have question after you have talked to your TA, then you can talk to your course (lecture) instructor but please indicate in your email that you first contacted your TA before going into your concerns.
Late assignments or components of assignments/Assignment extensions: Normally due dates are strict and extensions require documentation. Due to the likelihood of widespread Covid related illnesses late penalties will not be applied this semester. But if you do submit something after the due date/time then you should email your marker (TA in the tutorial that you are officially registered) so that person will know to look for it in D2L. Also if are submitting too many graded components late however this doesn't bode well for your performance in this course so you may be referred to the associate dean of undergraduate students (faculty of science) and she may contact you regarding your course work.
Assignments must reflect individual work; group work is not allowed in this class nor can you copy the work of others. Some "do nots" for your solution: don't publically post it, don't email it out, don't show it to other students. For more detailed information as to what constitutes academic misconduct (i.e., cheating) for this course please read the following [link].
You are to submit your assignment using D2L [help link]. Make sure that you [check the contents of your submitted files] (e.g., is the file okay or was it corrupted, is it the correct version etc.). It's your responsibility to do this! (Make sure that you submit your assignment with enough time before it comes due for you to do a check). If don't check and there were problems with the submission then you should not expect that you can "learn your lesson" and simply resubmit.
Submission received: |
On time |
Hours late : >0 and <=24 |
Hours late: >24 and <=48 |
Penalty: |
None |
-1 GPA |
-No credit (not accepted) |
Unless otherwise told you are to write the code yourself and not use any pre-created functions (or methods). For most assignments the usual acceptable functions include: print(), input() and the 'conversion' functions such as int(), float(), str(). Look at the particular assignment description for a list of other functions/methods that you are allowed to use and still get credit in an assignment submission. If it's not listed then you should assume that you won't be able use the function and still be awarded credit.