
Learn to loop through lists and strings with python 3 by using for loops to iterate over each element and print or process names or letters.
Master range based loops in Python by using range(start, stop) with for loops to iterate numbers from zero up to but not including stop, and print or utilize each value.
Explore nested loops by iterating over a list of lists representing classroom groups, and print each student's name by looping through each group and its members.
Learn how while loops run until a condition is met using a counter and avoiding infinite loops. See examples like printing hello and computing power of two from user input.
Explore break and continue in loops, using continue to skip iterations and break to exit when a target is found, as shown with defects in a factory and pi.
Unlock Python’s list comprehension to build, transform, and filter lists in one line, generating numbers 1 to 10 and copying lists to select even numbers with conditions.
Explore building a clothing store data model with loops and list comprehensions. Walk through computing total items and value, updating stock after sales, and filtering budget items with list comprehension.
Learn how to create dictionaries in Python with key-value pairs and perform lookups by key. Update dictionaries by adding entries and changing values, mapping sports to student counts.
Learn how to create a dictionary from two lists using dictionary comprehension and zip, pairing each sport with its student count to produce a usable key value mapping.
Learn to safely retrieve and remove dictionary entries in Python using get and pop, supplying default values like None or zero to avoid key errors.
Master dictionary methods by iterating over keys, values, and items, and learn to generate lists of keys or values and print key–value pairs using dict items.
Master Python dictionary operations via a classroom project: add and update student scores, use list comprehension, safely access grades with get, remove entries with pop, and compute final averages.
As our world becomes more and more technologically advanced, we become immersed in a digital era. In these modern times, it is important to learn how to code, and especially important for students to learn as the possibilities surrounding code are infinite. Especially with the current advent of machine learning, Python is one of the easiest and most powerful languages available, and having it in your arsenal is an excellent tool in this day and age. This is Part 3 of a 4 part course in Python.