top of page
Young-Woman-Writing-Auguste-de-la-Brely-

Python 

Cheatsheet

scroll

This cheatsheet only provides code and hints for the relevant tutorial. As a result, there are somethings that may be left out of this sheet. Additionally, this tutorial assumes an introductory level understanding of how code works and will thus not explain syntax basics. It is recommended that complete beginners start with an introductory tutorial on Python more generally before starting this tutorial. 

Recursion

 is a computational method of problem solving where the code will attempt to break a large problem into a set of smaller problems, working backwards until the larger problem is solved. In Python, recursion usually involves a function calling itself with some smaller version of the original data set. The function will continue to call itself until it reaches a solution, and then will use that solution to work backwards until it eventually solves the bigger problem. 

​

While Loops

While loops work precisely as their name implies: the loop is given some condition, and while that condition is still true, the loop will keep working through the code that is listed (and indented) directly under the while loop.  While loops are sometimes also replaced with For Loops.

bottom of page