Lecture 19
Python basics
Date: Nov 19, 2024
Learning Objectives¶
After today, you should have a better understanding of:
- Setting up and navigating a Colab notebook to write and execute Python code.
- Writing simple print statements to display output.
- Adding inline and block comments to make code more understandable.
- Using Python to perform basic arithmetic calculations like addition, subtraction, multiplication, division, and exponentiation.
- Defining and assigning variables.
- Recognizing and using basic Python data types such as integers, floats, strings, and booleans.
- Implementing decision-making logic using
if
,elif
, andelse
statements. - Using lists, tuples, and dictionaries to store and manipulate grouped data.
- Writing reusable code by defining functions with parameters and return values.
- Iterating over sequences using
for
loops. - Writing
while
loops to repeat actions based on conditions.
Materials¶
Additional resources¶
- Here are some additional resources for learning Python: kaggle learn, Software Carpentry, learnpython.org, and Google's Python Class