CPSC 217: Mini-Assignment 4a
Due at 4 PM. For assignment due dates see the main
schedule on
the course webpage.
New Concepts to be applied for the assignment
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.
Functional requirements
To get credit for this
assignment you must use the starting code
in the program '6creatingARandomList_listParameterAndReturn' (which
should be covered
in tutorial the week of May 29 - June 4 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].
How to do determine 'how you
did' on an assignment?
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".
You should still practice applying good style in your solution as well as
writing documentation. Unlike
the full assignments, for mini-assignments you will be just graded on program
functionality for the mini-assignments.
- Naming conventions: You should employ
good naming conventions for identifiers (variables and constants).
- Documentation: contact information (your name,
student identification number and tutorial number). This should be specified
in the header of the program (very top in the form of Python documentation).
In addition your documentation should specify:
- What does the program do.
- What are it's limitations e.g. the program
doesn't perform type checking (crashes when non-numeric information is
entered)
- The version number of the program (dates are
acceptable)
- Named constants should be used as
appropriate.
- The program code should have appropriate
white space (specified in the "Intro to programming lecture") and alignment
(specified throughout the lecture notes)
- Finally your program should follow
the 5 rules of thumb for designing software (Jakob
Nielsen's 10 usability heuristics)
which were included at the notes on 'Repetition' e.g. prompts to the user to
enter the required information should be clear to the user as to what is
required, good error messages should be provided for erroneous input etc.
-
What to submit: Submitted programs must run on
the computer science network (i.e. the computer rooms were your tutorials
are conducted) running Python 3.x. If you choose to install Python on your
own computer then it is your responsibility to ensure that your program will
run properly on the computer science network. Options for doing this
remotely were detailed in the [getting
started as a computer science student help link]. It's up to you if you
wish use the graphical program builder other than IDLE (or another
development environment rather than a simple text editor) to write/run your
programs but if you do you submit your program in the form of text ".py"
file or files. Windows users: take care that
you don't accidentally submit a shortcut to a file instead of the actual
file. (Check the file name and compare the file size to your
original file. Simply downloading the shortcut file as a test won't work
because that shortcut will work on your computer but not on anyone else's
machine and your work won't be graded.).
-
Late assignments or
components of assignments: Extensions may
be granted for reasonable cases by the course instructor with the receipt of
the appropriate documentation (e.g., a
statutory declaration with a commissioner of oaths). Location of the
online form: [PDF
file]. Alternate submission mechanisms (non exhaustive list of examples:
email, uploads to cloud-based systems such as Google drive, time-stamps, TA
memories) cannot be used as alternatives if you have forgotten to submit
work or otherwise have not properly submitted into D2L. Only files
submitted into D2L by the due date is what will be marked,
everything else will be awarded no credit. The final cut off date after
which full assignments will not be accepted is after the maximum
progressive penalty (listed below) can be applied.
-
Assignment extensions (before
the assignment is due): may be granted for reasonable cases by the course
instructor with the receipt of the appropriate documentation (e.g., a sworn
declaration with a commissioner of oaths). Typical examples of reasonable
cases for an extension include: illness or a death in the family. Example
cases where extensions will not be granted include situations that
are typical of student life: having multiple due dates, work commitments,
forgetting or mixing up due date etc. Tutorial instructors (TAs) will not be
able to provide extension on their own and must receive permission from the
course instructor first. If
you request an extension from me let me know the name of your tutorial
instructor and the tutorial number [link to : tutorial
and TA information) because the markers won't accept
late submissions without directly getting an email from me and I need to
know who to contact. Also
extensions need to be requested before the due date and not
afterward.
-
How you will be graded for mini-assignments. Similar
to many mini-assignments the grading is simple and doesn't require a
separate spreadsheet. Instead you can look in D2L under Assessments->Dropbox and
then clicking on the appropriate assignment link.
-
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.
Collaboration:
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].
Method of submission:
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.
-
Do not use compression utilities (such as zip) or archiving utilities
(such as tar) otherwise your submission may not be marked. The space savings
in D2L is not worth the extra time required by the marker to process each
submission.
-
How often can you submit: Multiple
submissions are allowed for this assignment: You can (and really should)
submit work as many times as you wish before the due date. However
only the latest file submitted is the one that will be marked, everything
else will be ignored (because it is not fair to your marker to sort through
multiple versions of your files).
Late
submissions for full assignments when there is no extension granted: Make
sure you give yourself enough time to complete the submission process so
you don't get cut off by D2L's deadline (or your submission will be
automatically flagged as late by D2L and it will be graded appropriately)..
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.