Tutorial 3

For loops and If statements

Tutorial Description

Welcome to the Tutorial 3 on "For loops and If statements". Here's a brief overview of what you can expect in this tutorial:

Introduction to For Loops

  • Understanding how for loops work with sequences like lists, tuples, strings, and ranges.
  • Exploring two primary ways to implement for loops in Python.
  • Hands-on examples illustrating the printing of values and storing results in lists using for loops.

Introduction to If Conditionals

  • Understand how if conditionals are used to test conditions in Python.
  • Learn the difference between If, Else, and Elif statements and their applications.
  • Practical examples demonstrating how to test for data types (like floats) using if conditionals.

Tutorial Exercise

  • Create a list of oil tanker vessels and their maximum sizes.
  • Implement a for loop to filter and display vessels based on specific conditions (like DWT).
The tutorial notebook and exercise could be found at JupyterHub on shared-storage/tutorials/tutorial3/exercise