HomePythonGeneral
Python · General

Python From Scratch Lesson 11 PDF (Python While Loops For Loops)

Cby Connect 4 Techs·4 Jun 2023·2,830 downloads Free PDF

Welcome to the eleventh lesson of the Python From Scratch series! In this lesson, we will be exploring two of the most commonly used loop structures in Python while loops and for loops. Loops are used to repeat a block of code multiple times, making them incredibly useful for aut

Welcome to the eleventh lesson of the “Python From Scratch” series! In this lesson, we will be exploring two of the most commonly used loop structures in Python – while loops and for loops. Loops are used to repeat a block of code multiple times, making them incredibly useful for automating repetitive tasks.

We will begin by learning the basics of while loops, including how to create them, how to use them to execute code repeatedly, and how to avoid infinite loops. We will then move on to for loops, which allow us to iterate over collections of items, such as lists or dictionaries.

Throughout this lesson, we will be building on the knowledge and skills that we have developed in previous lessons, so it is recommended that you have a solid understanding of Python fundamentals before diving into this one. However, even if you are new to Python, you should be able to follow along with the examples and exercises provided.

Overview about Our Python Lesson 11

Python While Loops & For Loops Four pages of summary in PDF format to start learning the Python language with a series of lessons that we will complete together to master the Python language

By the end of this lesson, you will have a solid understanding of how to use while loops and for loops in Python and how to incorporate them into your own programs. So, let’s get started!

Lesson Content

  • Python While Loops
    • Python Loops
    • The while Loop
    • The break Statement
    • The continue Statement
    • The else Statement
    • Python – While Loops Exercises
  • Python For Loops
    • Looping Through a String
    • The break Statement
    • The continue Statement
    • The range() Function
    • Else in For Loop
    • Nested Loops
    • The pass Statement
    • Python – For Loops Exercises

Lesson Format

PDF

Preview pages

4
8
12
16
20
24
Download

Ready to start reading?

Free PDF · hosted on Google Drive