Course details

Conditional Statements & Loops: While Loops in Python

Conditional Statements & Loops: While Loops in Python


Overview/Description
Expected Duration
Lesson Objectives
Course Number
Expertise Level



Overview/Description

While loops are one way to keep repeating a set of actions until a specific condition is met in Python. In this 11-video course, learners explore the use of while loops, considerations when implementing while loops, and use cases for while loops and for loops. Key concepts covered here include implementing a basic while loop and recognizing what conditions cause it to become an infinite loop; learning to use while loops to carry out actions while evaluating expressions based on numerical and string data; and examining while loops whose iterations depend on user input data. Next, learn syntax for defining while loops within a single line; learn to iterate over a list of elements with while loops; and learn to iterate over multiple lists and tuples with while loops. Learn when it is appropriate to use break keyword to stop a while loop, and learn to break out of a while loop and recognize use of the pass keyword within such loops. Finally, learn skip steps in individual iterations of a while loop using the continue statement.



Expected Duration (hours)
1.3

Lesson Objectives

Conditional Statements & Loops: While Loops in Python

  • discover the key concepts covered in this course
  • implement a basic while loop and recognize what conditions can cause it to become an infinite loop
  • use while loops to carry out actions while evaluating expressions based on numerical and string data
  • define while loops whose iterations depend on user input data
  • recall the syntax for defining while loops within a single line
  • iterate over a list of elements using while loops
  • iterate over multiple lists and tuples using while loops
  • identify when it is appropriate to use the break keyword to stop a while loop
  • use the break statement in multiple scenarios to break out of a while loop and recognize the use of the pass keyword within such loops
  • skip steps in individual iterations of a while loop using the continue statement
  • compare while loops and for loops and implement a while loop which terminates only when the user enters a specific input
  • Course Number:
    it_pycslpdj_04_enus

    Expertise Level
    Beginner