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 assignment requirements
Up to this point you have only
been using functions that have already been defined with
the Python programming language such as: print() and input(). For
this assignment you will be defining
(writing the body) a new function called smaller(). JT's
hint:
knowing your terminology is always important before starting an assignment. It
is imperative that you complete this prerequisite work for this assignment
otherwise you will have trouble understanding the following requirements.
- To get credit for this assignment you must use
the starting code provided in file [miniAssignment3A.py]
- Define the header for function smaller() that
takes as its arguments two parameters which are assumed to be integer values
although the type is not specified in the header. (Worth
1.0 GPA)
- Inside the body of the function:
- It will determine which
of the arguments is smaller (this feature must be correct in order to
get credit for the remaining features that follow). (Worth
1.5 GPA)
- The smaller value will be returned (either
argument can returned if both are equal). This feature must be correct
in order to get credit for the remaining features that follow. (Worth
0.5 GPA)
- Write the call to function
smaller at the specified
location in the body of the start() function.
The function return value will be stored in num3 (this
feature must be correct to get credit for the following feature). (Worth
0.4 GPA)
- Display the smaller number at the specified
location in the start() function
along with the original two numbers. (Worth
0.6 GPA)

The program already prompts the user for the two numbers,
function smaller must take as arguments the
two numbers entered by the user and determine which of these values is smaller.
You should still practice applying good style in your solution as well as
writing documentation. Unlike the full 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:
In a typical semester submitted programs must run on the computer science network running Python 3.x. If you
write you code in the lab and work remotely using a remote login program
such as Putty or SSH then you should be okay (assuming you don't login to a
non-Linux computer). If you choose to install Python on your own computer
then it is your responsibility to ensure that your program will run properly
here. Remote learning version: If it won't run using Python 3.x on any
computer then it
won't be awarded credit. It's up to you if you wish use the graphical
program builder 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.
-
Late assignments or components of
assignments: will not be accepted for marking without approval for an
extension beforehand. 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 for
mini-assignments is the due date because no late submissions are allowed for
these smaller programs.
-
Extensions
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 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 because the markers won't accept
late submissions without directly getting an email from me.
-
How you will be graded for full assignments. Similar to many
mini-assignments the grading is simple and doesn't require a separate
spreadsheet. Instead you can look in D2L Dropbox under the
appropriate sub-link you can see the numeric grade point for your submission
along with any comments that the marker may have added.
-
Questions about grading afterward:
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.
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.
-
Multiple submissions are allowed for this assignment (all versions are kept
in D2L): You can (and really should) submit work as many times as you wish
before the due date.
However only the latest version of all the files is what will be marked,
everything else will be ignored (because it is not fair to your marker to
sort through multiple versions of your files).
-
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.
-
Please make sure you submitted it properly before the deadline (the onus is
on you to do this).
-
If you don't do this:
-
Don't try to email to the marker or myself after the deadline because bypassing
requirements like this won’t allow you to be awarded credit.
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].
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.