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.

Target Audience:

Duration: 01:20

Description:

Explore how iterating over elements using for loops can be controlled using the break and continue statements in Python. Creating sequences from other sequences using comprehensions is also covered in this 9-video course. Key concepts covered here include how to terminate a for loop when a specific condition is met using the break statement; learning how the break statement affects the code in the else block of a for loop; and observing how to skip an iteration of a for loop when a specific condition is met using the continue statement. Next, learn how to use the continue statement along with the break statement within the same for loop; learn the fact that no action is performed under specific conditions by using the pass statement; and create a list out of the contents of another list using a comprehension. Finally, you will learn about conditions in list comprehensions in order to filter elements used in the source list and to define values in the newly created list.

Target Audience:

Duration: 01:06

Description:

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.

Target Audience:

Duration: 01:02

Description:

Learners will explore implementations of the order of precedence of operators, using if-elif-else statements to evaluate multiple conditions and conversions between various data types in Python, in this 15-video course. Key concepts covered here include how conditions in Python work, and how to evaluate conditions by involving primitive data types using if statements and complex data types using if statements. Next, evaluate multiple conditions for decision making with nested control structures; identify how to use the if-else statement to make decisions involving complex data types such as lists, tuples, and dictionaries; and learn how to convert an integer to a float and a float or an integer to a string, and vice-versa. Learners then observe how to convert primitive data types to complex data types, to convert between various complex data types, and to convert between various complex data types and view base conversions with Python built-in functions; and to solve various programming problems with Python built-in methods. Finally, you will learn to solve various programming problems by using if-elif-else statements and nested if-else statements.

Target Audience:

Duration: 01:42