Conditional Statements & Loops: While Loops in Python

Python    |    Beginner
  • 11 videos | 1h 19m 32s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 293 users Rating 4.6 of 293 users (293)
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.

WHAT YOU WILL LEARN

  • 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

IN THIS COURSE

  • 2m 23s
  • 9m 22s
    In this video, you will implement a basic while loop and recognize what conditions can cause it to become an infinite loop. FREE ACCESS
  • Locked
    3.  Basic While Loops - Part 1
    4m 18s
    In this video, you will learn how to use while loops to carry out actions while evaluating expressions based on numerical and string data. FREE ACCESS
  • Locked
    4.  Basic While Loops - Part 2
    6m 21s
    Find out how to define while loops that depend on user input data. FREE ACCESS
  • Locked
    5.  Single-line While Loops
    8m 24s
    After completing this video, you will be able to recall the syntax for defining while loops on a single line. FREE ACCESS
  • Locked
    6.  Evaluating Complex Data with While Loops - Part 1
    8m 46s
    Find out how to iterate over a list of elements using a while loop. FREE ACCESS
  • Locked
    7.  Evaluating Complex Data with While Loops - Part 2
    9m 8s
    Find out how to iterate over multiple lists and tuples using for loops. FREE ACCESS
  • Locked
    8.  Exit a While Loop Using the Break Statement
    9m 55s
    During this video, you will learn how to identify when it is appropriate to use the break keyword to stop a while loop. FREE ACCESS
  • Locked
    9.  Using the Pass Keyword in a While Loop
    8m 36s
    During this video, you will learn how to 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. FREE ACCESS
  • Locked
    10.  The Continue Statement in a While Loop
    6m 21s
    In this video, learn how to skip steps in individual iterations of a while loop using the continue statement. FREE ACCESS
  • Locked
    11.  Exercise: While Loops in Python
    5m 57s
    In this video, you will learn how to compare while loops and for loops and implement a while loop which terminates only when the user enters a specific input. FREE ACCESS

EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE

Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.

Digital badges are yours to keep, forever.

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.7 of 414 users Rating 4.7 of 414 users (414)
Rating 4.6 of 291 users Rating 4.6 of 291 users (291)
Rating 4.6 of 4198 users Rating 4.6 of 4198 users (4198)