Python Basics
Use the Template
to play around with the different basic building blocks of Python.
Create new cells with # %%
as necessary.
Use the Python Basics section and the reference for help.
Template
# %%# Types:# Boolean (bool), Integer (int), Range (range), Float (float),# Complex Number (complex), String (str), List (list), Tuple (tuple),# Dictionary (dict), Set (set), Absence of value (None)# %%# Variables and Assignment (=)# %%# Mathematical Operations (+,-,*,**,/,//)# %%# Comparisons (==,!=,<,<=,>,>=)# %%# Boolean Operators (and/or/not)# %%# String Expressions (+,*)# %%# List Expressions (+,*)# %%# Conditional Execution (if/elif/else)# %%# For Loops (for)# %%# While Loops (while)# %%# List Comprehensions [...]# %%# Dictionary Comprehensions {...}# %%# Functions (def)# %%# Anonymous Functions (lambda)# %%# Import Packages (import)# %%# List Indexing# %%# Dictionary Indexing