It's time to put your new knowledge and skills into practice to complete your assessment task!
We will practice with a couple of tasks before you complete your final assessment.
Here's the important tips:
Plan out your program first using algorithms or a flow chart. This will help you picture each step. I actually start a program by turning all the steps into comments first.
Remember to "code like a human". Use all the skills you learned.
Code and test one section at a time. Remember to record your testing and debugging as you go.
Use the marking criteria to make sure you have completed ALL criteria for a level.
If you need help with the code, the following sites are all approved for your use:
Use the knowledge checker on this website
Go back to Grok and review the lessons you completed
Search in Programiz for what you want to do. Put the word Python before your keyword e.g. "Python if else"
Use any programs you have previously written
Use the Thonny debug feature
DO NOT use AI sites for any help.
We use the Thonny Python IDE to help make Python programming even easier.
What's an IDE? An integrated development environment (IDE) is a software application that helps programmers develop software code efficiently. It acts as a link between your code and Python itself, helping you with syntax highlighting, auto-completion, code formatting, line by line execution, and generally trying to look after you!
Before you begin using it, watch the video below.
This tool, developed by Henry Hickman of the University of Canterbury, provides students with a portal to practice and write Python Code and get feedback on how well your code meets the criteria that you will be assessed against.
First you will have the chance to complete a range of trial tasks to get used to the platform. You can then submit these to get instant feedback on what you achieved against the Standard.
Once the assessment period begins, you will have access to the actual assessment tasks. There are a range available and you can complete more than one.
For these, however, you only get 3 attempts and limited feedback! Make sure you write your code and test it thoroughly BEFORE you submit!! See my important tips below.
These will be completed under exam conditions in class over a few lessons.
The assessment tool "marks" the code against the criteria for AS92004 and gives me a complete report and suggested mark.
Once it's been checked, I can use the generated reports as assessment evidence and award you your credits.
You can find the link here: https://csse-ncea-auto.canterbury.ac.nz/course/view.php?id=82
You will need to set up a new account.
I will share the enrolment key in class.
Testing and debugging is a really important part of programming.
When we are testing we are checking that it works as we expected. To do this we test our code regularly. These four questions really help:
What should happen?
What does happen?
Where exactly does it go wrong?
What clues do we have about the problem?
We also need to consider and test for different case types when we are testing. See below.
We need to consider and test for different case types when we are testing:
Expected Cases: What your program does when it receives the data it expects
Boundary Cases: What your program does when it receives data of the right kind but that is outside of what it is expecting. This is great for checking your > and < are working correctly
Invalid Cases: What your program does when it receives data that it is NOT expecting. It needs to be able to handle this and not crash!
If you find errors, then it's time for debugging - working through your code really carefully, paying attention to every detail to find out what went wrong and how to fix it.
Some good tips include:
Code and test one section at a time.
When you get an error message, take time to read and think about what it is telling you. Python is good at explaining what went wrong and where.
Check this article of common Python errors to understand what has gone wrong and how to fix them.
Look really closely, it's often the tiniest things that are wrong
Use lots of temporary print statements to help see what variables, lists, and dictionaries are doing.
"Comment out" sections to find our where problems are
The Thonny Debug feature is brilliant for seeing what is happening at every step (see below).
Use Grok or another source like Programiz to go back and check how to do something.
I've included a copy of a testing and debugging table with the assessment. This is great to make sure you are testing for all cases. You want to show when things haven't gone right so get into the habit of recording your testing early. Once it works it's too late to show how you fixed it!
Try and add a new line to this table every lesson. make sure you've tested all three case types.
Remember, to screengrab, press Win + Shift + S
• using a suitable programming language to construct a program that performs a specified task
• testing and debugging the program to ensure it works on expected cases
• documenting the program with comments.
• using succinct and descriptive variable names
• documenting the program with comments that clarify the purpose of code sections
• testing and debugging the program to ensure it works on expected and boundary cases.
• using conditions and control structures effectively
• using constants, variables, or derived values in place of literals to make the program flexible
• testing and debugging the program to ensure it works on expected, boundary, and invalid cases.