Python ~ grade 3
Summary
Prerequisites
Grade 3 is the first "core" grade where fundamental concepts are rigorously covered at an introductory level. We expect candidates to be familiar with all the core concepts needed to flourish at grades 1 and 2. Candidates must be familiar with simple coding environments such as Mu, although we encourage confident learners to graduate to more advanced editing tools.
Core concepts
Candidates are expected to demonstrate knowledge and, where appropriate, application of the following core concepts:
- Core data structures ~ a familiarity with lists, dictionaries, sets, bytes and string data. This should include an appreciation of when and how to use them as well as knowledge of methods associated with each type. Use of such types should also be idiomatic via evidence of iteration, slicing and other legitimate and useful programming techniques associated with such structures.
- Functions ~ define functions (with docstrings) that can handle
*args
and**kwargs
as well as named arguments with default values. Candidates should show understanding of why it's bad to use mutable data as default function argument values. They are able to call functions defined in such a way. - Multi-file project structure ~ the source code for the project is in its own directory. The source is spread between appropriately named and scoped modules.
- Documentation ~ supporting files such as
README
,LICENSE
,AUTHORS
andCODEOFCONDUCT
are in the root directory of the project and contain appropriate material (for example, theLICENSE
contains a recognised FLOSS license, or theCODEOFCONDUCT
is based upon a recognised and trusted source such as the PSF's own code of conduct). Furthermore, candidates should demonstrate an understanding of why such files are important. - Exception handling ~ an understanding of how to correctly use
try
,except
andfinally
for appropriate exception handling. Candidates should also demonstrate they canraise
exceptions when the situation is apt, and understand the nature, choice and use of the built in exceptions that come with Python. - Reading and writing files ~ candidates have clear mental models of how the file system works and how Python interacts with it. They can idiomatically open files to read, write and append (using the
with
statement, although context handlers are fully addressed in a later grade), and navigate around the file system (change directories, create and remove directories, copy, move and delete files). - Simple Internet ~ basic use of modules such as requests to make simple calls across the Internet to gather or push data to/from APIs. Candidates should demonstrate a basic understanding of HTTP's client/server model and the GET, POST, PUT and DELETE request types.
- Simple source control with GIT ~ candidates are able to use
git
to initialise a repository (git init
) and create a series of commands (git add
,git rm
,git mv
,git checkout
andgit commit
) which show the history of the development of the project. They can interrogate git at a basic level withgit status
andgit log
. They understand the core concepts of a commit and a repository as well as being able to explain why one might use version control.
Learning
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 and previous grades).
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.
The project
From this grade onwards, mentors start to look for evidence of a more refined or sophisticated outlook to coding. It's not enough to just make a project work, the code should be clean and simple with evidence of refinement and clear and logical organization.
Since grading is cumulative, candidates should also understand, and if required, demonstrate and describe the core concepts for grade 1 and grade 2.
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? TODO: Add examples
Assessment
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 3, consider the following real-world project.
print("An example")
When thinking about this project's code, take note that:
- TODO
A mentor may, at their discretion, ask about core concepts not directly in evidence through a candidate's project. For example, handling return values from a function is clearly missing from the example project and so the creator may be asked to explain this missing aspect to the mentor.
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 a discussion with the candidate on the project's page.
Evidence of the candidate's engagement, skill and level of attainment is gathered in the ensuing conversation about the project. This is 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.