This repository contains Python code and instructions for practicals for the subjects CP1404, CP1804 and CP5632 at James Cook University.
Many files contain # TODO
comments, which are part of the instructions for what students need to do.
Complete instructions are found in each prac folder.
Selected practical solutions are provided here, in the "solutions" branch.
These are to help you learn by evaluating your own work and seeing our suggested ways of solving the practical problems.
Important: Please use the solutions in a mature and honest way, as helpful learning tools... after you complete your own work, not as something to simply copy into your own prac work. OK?
Seriously, never copy the solutions as this will not help you learn as much as doing your own coding.
Practical numbers do not necessarily correspond to weeks. E.g. some subject offerings run in 10 weeks, some in 13 weeks.
- Practical 01 - PyCharm, Control
- Practical 02 - Strings, Files, Exceptions
- Practical 03 - Functions, GitHub
- Practical 04 - Lists
- Practical 05 - Dictionaries, Code Reviews with PRs
- Practical 06 - Classes
- Practical 07 - Kivy
- Practical 08 - Inheritance
- Practical 09 - OS
- Practical 10 - Testing, API, Flask
Assessment will be based on completing the tasks up to but not including the practice/extension section. You will be marked as follows:
- 4 = Excellent response to all questions (Always aim for this!)
- 3 = Good response to most or all questions, but some omissions or problems
- 2 = Reasonable response to some questions, but some significant omissions or problems
- 1 = Reasonable response to at least one question
- 0 = Minimal or no attempt
Note: This subject is all about learning best practices and patterns for solving problems using programming (in Python) and it is important that you learn these important foundations according to the teaching philosophy of the subject. For this reason (to help you learn properly!), you will not achieve full marks for working/complete practicals that are not done in the way that we prescribe. Here are some reasons that you might lose marks for your practicals (and assignments):
- Your work looks too similar to any provided solutions
- Your work includes concepts and code not taught in the subject
- You miss or skip part of a question (you must attempt all requirements for all questions)
- Your work does not follow the core concepts and patterns (e.g. using global variables, while True loops or similar techniques), even if they work!
Each practical is usually structured in multiple parts:
-
Part 1 is usually a walkthrough or a warm up that should not take long but shows you working code (which you can reference and learn from),
-
Part 2 is usually a "fill-in-the-blanks" where you must do a small task, mostly modifying existing code,
-
and Part 3 is usually a "do-from-scratch" exercise where you do the whole task with the benefit of having completed the earlier parts.
-
The practice/extension section provides further challenges for you to practise and extend your programming skills. (You do not need to complete these sections for your prac marks.)
Important: You should not expect to learn and do well in this
subject if you only do the minimum contact hours (like just these pracs). You
need to be practising and revising your programming regularly multiple
times every week. You can find even more practice projects at
https://github.com/CP1404/Starter/wiki/Practice-Programming-Projects
Some students have found benefit from doing extra online courses like
the video-based ones at LinkedIn Learning
All code for pracs can be found here at
https://github.com/CP1404/Practicals - Many of these files have
# TODO
comments to highlight what steps to do.
You may want to download or clone the practicals repository... but we don't expect you to know
how to use GitHub yet, as we will teach you that in a couple of weeks.
You need to save your work from every prac. Keep every file/script you write.
We suggest you use a USB disk and cloud storage (like OneDrive) and organise it using folders, like CP1404/practicals/prac_01.
After we learn to use GitHub, your practicals will also be stored in a public GitHub repository.
Give each file a logical name so you can find it again. Also, when you need to make changes to an existing script for a separate question, make a copy of the old question first so you have a record of everything. Don't save your work to the JCU computers' local drives, but into your own storage area. You can use the local hard drive for temporary storage, then move your work onto your disk or cloud storage.
For important work like assignments, please make sure you have multiple backups.