Due at 4 PM. For assignment due dates see the main schedule on the course webpage.
New Concepts to be applied for the assignment
- File input: reading text information into a 2D list
- Exception handling
Functional requirements (features your program is to implement) The program must be written and run under python version 3.X.
Reading the starting patterns from a text file (10x10 world) into the 2D list (worth fewer marks). [Directory containing the cases for previous project in the form of text files]
The starting patterns of critters will be in square pattern (10 rows, 10 columns) so your program will only have a fixed size biosphere. Similar to the last mini assignment the name of the input file can be chosen by the user.
- Prompt the user for the name of the input file & if the file is empty it will display an error message.
- Open the input file and read the starting pattern of critters and empty spaces into the world.
- If there is any problems associated with the file (cannot open, file is empty, there is an error during the read process) then the program will display an appropriate error message and repeatedly prompt the user for the name of the input file and begin the file read process anew.
Reading the starting information from any arbitrarily sized rectangle file into the 2D list (worth a greater number of marks) [One example input file]
The starting pattern of critters will be from any sized rectangular sized grid (minimum of 1 row or column a maximum of 20 rows x 30 columns. (Theoretically your program should be handle a larger input file but there may be problems displaying the results in a reasonable fashion).
In order to get credit for these features your program must be able to implement the features from the first part of the project such as:
· running on a turn by turn basis until the user quits,
· for each turn update the biosphere based on the specified rules for births and deaths,
· display the before and after state of the biosphere side by side.
To help you visualize the layout of the starting input files you may want to view an example starting input file with formatting marks turned on in Word. Also you might want to create test files of various sizes using Word (but saving them as .txt files). Of course to be able to check if your program has completed the above tasks successfully the program needs to display the state of the simulation.
In addition to grading on whether the above functionality was correctly implemented TAs will also look at documentation and style.
Documentation requirements
- Header documentation (very top in the form of Python documentation):
- Contact information (your name, student identification number and tutorial number).
- What does the program do.
- What are its 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).
- Inline documentation: list the features of each room that were implemented in a particular function e.g. living room: display menu options continuously, can pick up the string
Style requirements
- Naming conventions: You should employ good naming conventions for identifiers (variables, constants, function names, program file names).
- 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).
- Code is self documenting e.g. Clear expressions (e.g. mathematical, Boolean).
- Of course if a student implements an extreme case of inefficient code (e.g. multiple loops or branches are used when one will do) then penalties may be applied but this is generally rare.
- Your program should follow the 5 rules of thumb for designing user friendly software (Jakob Nielsen's 10 usability heuristics) which were included at the notes on 'Repetition' e.g. good error handling (such as prompts to the user to enter the required information clearly indicate what is required, good error messages should be provided for erroneous input) minimizing the user's memory load, being consistent, providing clearly marked exit & providing feedback as appropriate.
- Function specific: Functions are one screen in length (normal screen resolution say ~30 lines max of code (excludes whitespace and documentation).
- Function specific: Functions implement one well defined task (e.g. processLivingRoomCommands() vs. processlivingRoomRunIntroductionRunConclusion())
- Function specific: Code in one function is not duplicated in another function (not in the notes but this is just common sense that you don't write two functions where there's overlapping code - the overlap should likely be taken out of both functions and moved to another separate function). In this assignment there may appear to be some overlap (e.g. each room displays a menu of options but the specific options displayed will not be identical).
- Function specific: No global variables (unless you have a compelling reason that you have justified to the course instructor or something explicitly allowed such as a debugging flag).
Your program should consist of at least 5 functions including the starting function.
Because the new learning concepts to be applied are related to functions and tools/topics related functions your grade will be severely impacted if you bypass the use of these concepts in this assignment and all other subsequent assignments (or projects if required during the semester). Your goal is to define at least 5 functions but in terms of marking the absolute minimum you can have is 3.
Submitting your work (Python program):
- The document must be electronically submitted using D2L. This applies to on-time or late submissions.
- D2L configuration for this course
- Multiple submissions are allowed for this assignment: You can (and really should) submit work as many times as you wish before the due date. Due dates are strict, only what is in D2L by the deadline is what will be marked. Other methods of verifying that your work was completed on time (e.g. checking timestamps, emailed files etc.) will NOT be accepted.
- Multiple files can be submitted for this assignment (e.g. A1_version1_May7, A1_version2_May8 etc.) Consequently all versions of your submissions will be retained. However only the latest versions of each individual document (for assignments that require multiple files to be submitted) are the ones 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).
- Do not use compression utilities (such as zip) or archiving utilities (such as tar) otherwise your submission may not be marked.
- 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 your submit your assignment with enough time before it comes due for you to do a check)
Marking
- All the projects will be marked by one Teaching Assistant (ashratuzzavin.asha@ucalgary.ca). 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 the marker, then you can talk to your course (lecture) instructor.
- As well as being marked on whether "your program works" you will also be marked on non-functional requirements such as style and documentation. Consequently this assignment will include a separate [marking checklist]. Besides seeing your grade point in D2L you can also see the detailed feedback that your TA will enter for each student. You can access the grading sheet in D2L under Assessments->Dropbox and then clicking on the appropriate assignment link. If you still cannot find the grading sheet then here is a [help link]
Points to keep in mind:
- Due time: All assignments are due at 4 PM on the due dates listed on the course web page. 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.
- 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).
- Identifying information: All assignments should include contact information (full name, student ID number and tutorial section) at the very top of your program in the class where the 'main()' method resides (starting execution point). (Note other documentation is also required for most assignments).
- Collaboration: Assignments must reflect individual work; group work is not allowed in this class nor can you copy the work of others. For more detailed information as to what constitutes academic misconduct (i.e., cheating) for this course please read the following [link].
- Execution: programs must run on the computer science network (if applicable during that particular semester) 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. If it won't run using Python 3.x then it won't be awarded credit. It's up to you if you wish use the graphical program builder IDLE to write/run your programs but if you do you submit your program in the form of text ".py" file or files.
- Use of pre-created Python libraries: unless otherwise told you are to write the code yourself and not use any pre-created functions. For this assignment the usual acceptable functions include: print(), input() and the 'conversion' functions such as int(), float(), str(), len() as well as the open(), append(), readline() methods.
- 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.
8. Questions about marking: Your Teaching Assistants will be marking the assignments so I will first direct your questions to them regarding the marking.
9. Late submissions (no extension granted):
Short answer portion (Worth 0.3 GPA)
It will completed as a D2L quiz which will be opened for access 72 hours before the due date. One question will come from the lecture notes "Introduction to Computer Science" while the other question will come from the lecture notes "Computer history". During the time it's available you can find the quiz in D2L under: Assessments->Quizzes->Project Part short answer.
Submitting your work (D2L quizzes):
'Submit' for D2L quizzes is equivalent to you handing in your paper exam in a regular in class exam.
DO NOT submit your quiz until you really are done writing the quiz because, similar to a paper exam, you won't be able to start writing after you have done so.
DO submit your quiz when you have finished. Similar to a paper exam if you don't hand anything in then you shouldn't expect that it will be marked.
In D2L you will see a submit button twice. When you press one button you will see an option to press the second button. You need to click on both of them to have your exam graded.
First time you see it is when (I believe) when you get to the last question in your exam you will see the 'Submit Quiz' button outlined in red. (Screen capture is from the exam for another lecture).
Second time after you click on the first button. This time you will see a warning something to the effect that you are now submitting your work for grading and you won't be able go back to your exam if you do so. Click on the second button (again outlined in red) when are really done!
Finding your grade for the short answer portion
After grading is incomplete you can find your grade for the Short answer portion in D2L under: Assessments->Grades. You won't see it in the D2L Dropbox because you supplied your answers as a D2L quiz not along with the python program part of this project. I will be marking this portion of Project Part II so if you have questions then you can direct them to me.
Mapping of raw score to grade point for the short answer portion
Min raw score GPA 0 0 1 0.06 2 0.09 3 0.12 4 0.15 5 0.18 6 0.21 7 0.24 8 0.27 9 0.3