Save this video — free

Lecture 9: Loops Exercises

Professor Rosen · 1:12:54 · Watch on YouTube

Lecture 9: Loops Exercises Watch on YouTube →

Overview

The lecture develops loop-based problem solving through four exercises: counting vowels, counting even digits, detecting three-digit Armstrong numbers, and searching for the Riddler’s address. It emphasizes accumulator variables, Python membership tests, string iteration, and arithmetic digit extraction with modulo and integer division, while also advising students to practice without AI and explaining exam preparation expectations.

Key takeaways

Chapters

0:00 Python Editors: IDLE, VS Code, Geany, and Command-Line Options
6:35 Why Beginners Should Turn Off AI Coding Assistance
8:20 Practice Exam Timing, Difficulty, and One-Sheet Notes
12:23 Exam Focus: Turtle Graphics and Nested for Loops
16:00 Function Returns and the Vowel-Counting Setup
21:00 Counting Vowels by Iterating Through a String
25:00 Why `letter == 'a' or 'e'` Counts Incorrectly in Python
31:50 Shorter Vowel Solutions with Membership and `str.count`
37:17 Even-Digit Counting: Why Integers Cannot Be Iterated
41:48 Student Work Time: Comparing String and Arithmetic Approaches
47:50 Counting Even Digits by Converting the Number to a String
52:08 A while Loop Extracts Digits with `% 10` and Integer Division
58:39 Testing Three-Digit Armstrong Numbers with Cubed Digits
1:05:14 Brute-Force Search for the Riddler’s Four-Digit Address

Keep these chapters and the full searchable transcript in your own library.

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Professor Rosen.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.