Skip to content

Lecture 19
Python basics

Date: Nov 19, 2024

Learning Objectives

After today, you should have a better understanding of:

  1. Setting up and navigating a Colab notebook to write and execute Python code.
  2. Writing simple print statements to display output.
  3. Adding inline and block comments to make code more understandable.
  4. Using Python to perform basic arithmetic calculations like addition, subtraction, multiplication, division, and exponentiation.
  5. Defining and assigning variables.
  6. Recognizing and using basic Python data types such as integers, floats, strings, and booleans.
  7. Implementing decision-making logic using if, elif, and else statements.
  8. Using lists, tuples, and dictionaries to store and manipulate grouped data.
  9. Writing reusable code by defining functions with parameters and return values.
  10. Iterating over sequences using for loops.
  11. Writing while loops to repeat actions based on conditions.

Materials

Additional resources