Python ~ grade 1
Grade 1 is suitable for those with absolutely no previous experience of programming.
We strongly recommend the candidate use or is familiar with the Mu Python code editor for their project and interactions with the mentor. This is the only grade where it is acceptable to use a block based development environment to create Python code for a project (see, for example, Edublocks), although candidates are expected to present their code as text (not blocks).
Candidates are expected to demonstrate knowledge and, where appropriate, application of the following core concepts:
- Assignment: an understanding that the name on the left of an
=symbol is assigned the value on the right of the
- Basic types: a basic familiarity with strings (
str), integers (
int), floats (
float) and boolean (
- Simple arithmetic / numeric operations: correct use of:
- Simple program control flow: use of
for i in range(x):along with an understanding of indentation to define scope of related code blocks.
- Basic input and output (IO): use of the
inputbuilt-in functions, basic event handling in games, or simple sensor readings or hardware based signals (if making a hardware based project).
- Simple commenting and/or informal documentation: demonstrates use of the
#symbol to add commentary to code. Shows an understanding of triple-quoting at the start of files to describe the contents therein.
- Basic REPL use: can explain the R, E, P and L concept, understands the built-in
dirfunctions for exploring Python from within the REPL.
- Random selection/integers: use of
random.randintto generate random values. NOTE: the candidate need not understand why they need to
import randomat the start of their script.
- Lists: creation of new lists (
my_list = [1, 2, 3, 4]), use of simple list-related methods / functions (
len), membership (
x in my_list) and access by index (
- Code review: can explain the difference between a syntax error and a runtime error. Makes use of their IDE's linting features to reveal syntactic problems in code. Reads and understands code flow and state in order to reason about and fix code under review.
- Simple imperative structure: an understanding of how execution of the code moves in a step wise ("through composed") manner. NOTE: the definition and calling of functions is first addressed in grade 2.
CodeGrades does not provide teaching or learning content. There are already excellent lessons, resources and educational materials found elsewhere (many for free, via the internet). A good first step for candidates is to type "Python", and the core concept under study, into their preferred search engine.
An important skill to cultivate when learning to code is an ability to find, evaluate and absorb new information, skills and practices. An exciting part of such a fast changing technical world is that there's always something new to learn. Coding is an opportunity for such personal and technical growth.
Our aim is to help candidates become autonomous learners, capable of engaging with, reflecting upon and evaluating the different approaches and techniques they'll encounter as a coder.
While they are responsible for their growth and learning, candidates are supported by CodeGrades through interactions about their project with a mentor. The candidate's project is a way to practise, integrate and make use of the newly discovered skills and knowledge (informed by the core concepts for this grade).
However, candidates may find our guidance for teachers a source of useful information. I explains the sorts of activities and processes to engage in (but not the content) to increase a candidate's chance of fulfilling the requirements of this grade.
This is the first grade many candidates take, so it's important to note that code mentors expect projects to be simple, small and relatively naive in implementation.
When candidates have a working project we encourage them to submit it for assessment as soon as possible, so they benefit from the help, support and feedback of a mentor at the earliest possible opportunity.
What does a successful project look like?
These three examples all passed at different levels of attainment for grade 1, and show how we expect a project to unfold:
- Poetry Please (Pass)
- Recreating an educational cardboard computer project from the 1980s, that writes limericks on demand.
- Mask emote-o-matic (Pass with merit)
- Emote a smile or a frown through your COVID mask with a CircuitPlayground Express and Python.
- Splat a Cat (Pass with distinction)
- A silly whack-a-mole style PyGameZero game written for my young cousins to play.
It's helpful to understand how mentors assess and engage with a candidate's project. Our guidance for mentors will help reveal this process from the mentor's point of view.
In the specific case of the approach taken to grade 1, consider the following real-world project.
The creator, a young school-age coder, theorised that a person’s body temperature reflected stress levels. Their stress-buster device, gently and humorously created for their stressed out computing teacher, allowed the user to become aware of and then manage their levels of stress.
The creator provided evidence they were thinking carefully about the user of their project and clearly articulated their approach, aims and objectives.
They also provided engaging evidence such as this photo showing the device, as constructed by the creator.
Evidence of how the project is supposed to work (as worn by the student's computing teacher) was a joy to behold:
The Python source code for the project is reproduced below:
""" This mask was made to demonstrate how a CircuitPlayground Express could be used to measure body temperature and indicate stress levels. My theory is that body temperature is an indicator of stressful feelings and that people can better control their stress when they have a visual indication of their own stress state. """ from adafruit_circutplayground.express import cpx import time while True: # get the temperature in F temp = cpx.temperature * 9 / 5 + 32 print((temp,)) #Farenheight output for Mu plotting time.sleep(0.5) if temp > 91: # This is my initial theory for the stress levels and temperature cpx.pixels.fill((255,0,0)) elif temp < 90: cpx.pixels.fill((0,255,0))
When thinking about this project's code, take note that:
- While they import modules, they don’t need to explain what’s going on at this point in their coding journey.
- They demonstrate a
whileloop, simple arithmetic and numeric operators, IO (using the
cpx.temperaturevalue and the
elif) and commenting.
- It is a relatively simple script in a “through composed” style (no abstractions like functions).
- The comments demonstrate awareness that others may need to understand and maintain this code.
- There are actually only 10 lines of Python code.
- It’s fun and the creator has obviously thought about the users’ needs.
As a result, the creator, with only a few lines of code, has demonstrated the majority of the core concepts described for grade 1.
A mentor may, at their discretion, ask about core concepts not directly in evidence through a candidate's project. They will definitely engage with the project via an intervention (a process described here).
Further evidence of the candidate's engagement, skill and level of attainment is gathered in the ensuing conversation about the project. The intervention is also an opportunity to create new and stimulating learning opportunities: a vehicle for the mentor to supportively encourage the candidate to achieve more than they, at first, may have imagined possible.
When the mentor feels they have enough evidence to understand the candidate's level of attainment they write up their feedback and the final result is delivered to the candidate.