Conditional Statements & Loops: The Basics of for Loops in Python

Python    |    Beginner
  • 9 videos | 1h 1m 26s
  • Includes Assessment
  • Earns a Badge
Rating 4.6 of 436 users Rating 4.6 of 436 users (436)
Loops are one way to perform the same operations repeatedly in a program. For loops are the control structure to use when the repeated operations are performed on a sequence such as a list or a tuple. In this 9-video course, you will explore different ways to iterate over a sequence using for loops. Key concepts covered in this course include how to use for loops to process elements in a list and characters in a string; and how to code for loops to iterate over values in a tuple and the keys and values in a dictionary. Next, learn the function of associating an else block with a Python for loop; include if-else statements and other for loops within a for loop; how to generate a sequence of consecutive integers with the range function; and how to use the range function to iterate over a large range of values and apply it within nested for loops. Finally, observe how to write for loops in order to iterate over 1-dimensional and 2-dimensional sequences.

WHAT YOU WILL LEARN

  • Discover the key concepts covered in this course
    Use for loops to process the elements in a list and the characters in a string
    Code for loops to iterate over values in a tuple and the keys and values in a dictionary
    Recognize the function of associating an else block with a python for loop
    Include if-else statements and other for loops within a for loop
  • Generate a sequence of consecutive integers with the range function
    Define the interval in a sequence of increasing and decreasing integers using the range function
    Use the range function to iterate over a large range of values and apply it within nested for loops
    Write for loops in order to iterate over 1-dimensional and 2-dimensional sequences

IN THIS COURSE

  • 2m 29s
  • 8m 23s
    During this video, you will learn how to use for loops to process the elements in a list and the characters in a string. FREE ACCESS
  • Locked
    3.  Iterating over Elements in a Tuple and Dictionary
    8m 48s
    During this video, you will learn how to code for loops to iterate over values in a tuple and the keys and values in a dictionary. FREE ACCESS
  • Locked
    4.  The else Block of a for Loop
    7m 23s
    After completing this video, you will be able to recognize the function of associating an else block with a Python for loop. FREE ACCESS
  • Locked
    5.  Nested Control Structures in a for Loop
    6m 41s
    In this video, you will learn how to include if-else statements and other for loops within a for loop. FREE ACCESS
  • Locked
    6.  An Introduction to the range Function
    7m 58s
    Find out how to generate a sequence of consecutive integers using the range function. FREE ACCESS
  • Locked
    7.  Setting Intervals in a Range
    7m
    Learn how to define the interval in a sequence of increasing and decreasing integers using the range function. FREE ACCESS
  • Locked
    8.  Exploring the range Function
    7m 31s
    Learn how to use the range function to iterate over a large range of values and apply it within nested for loops. FREE ACCESS
  • Locked
    9.  Exercise: Basics of Python for Loops
    5m 15s
    Find out how to write for loops in order to iterate over 1-dimensional and 2-dimensional arrays. 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 2165 users Rating 4.6 of 2165 users (2165)
Rating 4.6 of 255 users Rating 4.6 of 255 users (255)