🐍
Python Guides
Learn all about grading Python assignments in CodeGrade with our step-by-step guides.
Python is one of the most popular languages in the world and is one of the most commonly AutoTested languages in CodeGrade. In this section we offer some guides on how you can set up autograded Python assignments in CodeGrade. These guides are by no means exhaustive and are intended as starting points from which you can create more customized automatically graded assignments according to your needs.
Learn how to set up a basic Python assignment in CodeGrade.

​
πŸ€–
Autograding Python using Pytest unit tests

Next to our built-in I/O tests for autograding, one of the easiest ways to autograde larger Python assignments is through unit testing. CodeGrade has out of the box support for the Pytest unit testing framework. In this guide, you will learn how to write Pytests for your assignment and how to set them up inside CodeGrade.

​
βœ…
Grading student's Unit Tests

One of the key elements of software engineering is creating unit tests for the software you are writing. As a result, many degrees offer courses in which students are taught to create their own unit tests. CodeGrade offers ways to autograde these student unit tests using measurements like Code Coverage and Mutation Testing.

​
πŸ‘¬
Giving your students easy to understand Python traceback using Friendly

Once in a while, we find out about tools that are too good and useful for education not to share. Python's friendly package was one of them. With this tool in CodeGrade, you can translate all of Python's output to more readable and easy to understand feedback, including pointers, explanations of the error and even translations to Spanish or French!

​
🎲
Automatically grading assignments with random outputs

All students will need to learn how to use Python's random module sometime in their Introductory Courses. Grading these submissions that include (pseudo-)random output, can be challenging. In this guide, we explain two simple methods that you can use to check the functionality of students' code, even if they use random variables to compute the output.