Python Cheatsheet

Made By: Perry


Basic Terminology

Variables - Variables are assigned values using the = operator. They can any value of different data types like strings, integers and floats

Operators - Operators are symbols like * / + -. They can be used to perform mathematic and arithmetic operations.

Commenting - Commenting can be done by using # to explain what you code does.


Basic Python Data Types


String


Integer


Float


Boolean


If... Else Statments

For and While loops


While loops

For loops


Important Built-in Functions

print() - prints the value of the variable or string inside the brackets

.format() - replaces the placeholders that are made from curly brackets

.upper() - change a string to uppercase letters

input() - ask a user for input which then be assigned to variables