Learn how to use the power of for Loops, while Loops, nested loops (and more. ) in Python. Build 4 projects, understand how loops work behind the scenes, and practice with coding exercises.
Take your Python skills to the next level by mastering loops and looping techniques.
Learn how to use the power of for Loops, while Loops, nested loops (and more. ) in Python. Build 4 projects, understand how loops work behind the scenes, and practice with coding exercises.
Take your Python skills to the next level by mastering loops and looping techniques.
Learn how for Loops and while Loops work behind the scenes with step-by-step graphical explanations.
Use the power of built-in Python functions such as range(), enumerate(), zip(), sorted(), and reversed() to make your loops more powerful, more concise and more readable.
Understand how nested for loops and nested while loops work and learn how to use them in practical scenarios.
Customize the functionality of your loops with break and continue. Learn how they work and when to use them.
Iterate over strings, lists, tuples, dictionaries, and sets.
Detect infinite loops, find their cause, stop them and fix them.
Write clearer and more concise Python code.
Student Reviews
- "This course in awesome, it makes me understand the power of loops and how it benefit us in programming." - Surya Teja.
- "Great course. Most python courses do not cover loops in depth. Having an in depth understanding of loops is quite essential as loops are a crucial aspect of programming." - Dee.
- "My sincere thanks go out to the instructor. For more than five years I have been trying to learn Python, but I am not satisfied with my learning method. After taking this course, I understood how to learn the programming and execute the code in a beginner's manner. I would recommend this course not only for professionals, but even for school kids who want to learn how Python syntax and code work together to build a program. Ultimately, I found a course that suited my learning style and helped me understand the concept. In a simplified manner, she will help you clear up any doubts you may have." - Durga.
- "I love this course, the instructor has a way to make these serious materials feels fresh and fun."- Ivan Juniardi.
Course Updates
August 2023 - UPDATE. Section 21 now has intermediate and advanced coding exercises.
May 2023 - NEW. Updated video lectures with a renewed style and a new code editor (Visual Studio Code).
May 2023 - NEW. Updated section overview videos
May 2023 - NEW. Updated lecture and section names
May 2023 - NEW. Improved assignments
May 2023 - NEW. Discussion topics for each section
May 2023 - NEW. Redesigned first and last sections
May 2023 - NEW. Improved and expanded quizzes
April 2023 - NEW. Updated articles with new format.
Nov 2021 - NEW. Updated quizzes with detailed explanations for each answer.
Oct 2021 - NEW. Downloadable Python files for the course exercises.
Enhance your resume with new Python skills.
Python is a very popular programming language that is used for a variety of real-world applications, including web development, data science, machine learning, and artificial intelligence. Learning Python loops and looping techniques is a great way to advance your skills in computer science. Loops are essential tools for any programmer, and they can be used to write powerful and efficient programs.
You will definitely use loops in any field, including:
Web Development
Machine Learning
Data Science
Artificial Intelligence
Game Development
Mobile App Development
Bioinformatics
Medical Software
Computer Vision
and... many more.
Loops are also essential to implement data structures and algorithms. If you are thinking about entering any of these fields or if you are planning to expand your computer science skills, then this course is for you.
Any piece of software that you can possibly imagine has repetitive processes that are implemented using loops. The concepts and techniques that you will learn in this course are easily transferable to other programming languages like Java, JavaScript, and many more.
Goals
By the end of this course, you will be able to:
Work with for loops and while loops in your programs.
Understand how they work.
Read loops written by other developers and understand their purpose.
Write nested loops and determine when to use them to approach tasks.
Use the break and continue statements to stop loops when certain conditions are met.
Use built-in Python functions in your for loops to write cleaner code, remove unnecessary variables, and make your code more concise.
Projects
You will work on 4 projects:
Draw a Pattern: you will use Python's built-in turtle module to draw patterns using for loops. We will start by drawing simple patterns and then gradually increase their complexity. You will be able to customize this project and experiment with the principles of for loops.
Caesar Cipher: you will implement this basic encryption algorithm using a for loop. When the project is completed, you will be able to encrypt and decrypt secret messages (like Julius Caesar did. ).
Guess the Number: you will use a while loop and the binary search algorithm to implement a text-based guessing game. The user will select a number between 1 and 100, and the computer will try to guess the number by repeatedly halving the range of possible numbers. The binary search algorithm is explained in detail during the course.
Analyze Book Passages: you will use nested loops to read and analyze the content of a book passage in a text file. The program will display the frequency of each letter and the letter with the maximum frequency.
As you can see, you will have many opportunities to apply your knowledge in a wide range of areas during the course.
You will also acquire additional skills such as: problem solving, computational thinking, file handling in Python, knowledge of the Binary Search algorithm and the turtle module. All while learning how to work with loops.
Learning Material & Resources
Throughout the course, you will find these resources:
Video Lectures: 10+ hours of video lectures with carefully designed graphics, tables, and code visualizations. You will see how the code works behind the scenes with step-by-step explanations.
Projects: build 4 projects and apply your skills in practical scenarios.
Coding Exercises: practice with 40+ interactive coding exercises with their corresponding solutions. You will be able to check your solution immediately with the automated grader.
Quizzes: check your knowledge with 30+ quizzes with 120+ questions that provide unlimited attempts and instant feedback.
Course Exam: take a final exam to test your knowledge of everything you learned during the course. The exam consists of 25+ questions and you can take it as many times as you like. You will receive detailed results for each attempt, so you can track your progress and identify areas where you need to improve.
Study Guide: review for the course exam with a detailed study guide with 100+ questions.
Articles: read 80+ articles with detailed explanations and illustrations.
What makes this course unique?
This course is unique in its focus on providing visual and detailed explanations of how each type of loop works in Python. You will not only learn how to use loops, but you will also understand the purpose of each line of code. This will give you a deeper understanding of how loops work and how they can be used to solve problems.
The course comes with a variety of study materials that complement the course experience. These resources include a study guide specifically designed for the course, which includes over 100 questions on the course content.
You will be able to solve coding exercises directly on the browser and you will receive instant feedback for your submission.
You will check your knowledge with quizzes that provide instant feedback and questions that will make you think more deeply about the topics presented in each section.
You will receive a certificate of completion that you can add to your resume and social media profiles to showcase your new skills.
You will also have lifetime access to the course.
You are very welcome to watch the preview lectures and check out the full course curriculum.
If you are looking for an engaging, visual, and practical course, then you found it.
Enroll now, add "Python Loops and Looping Techniques" to your resume, and showcase your new skills.
Concept of iterable.
What is considered a "member" of an iterable.
Types of iterables in Python.
Use of the terms "element" and "item" during the course.
Quick review of boolean operators and functions.
Introduction to Strings.
Characteristics.
How to access individual characters using indices.
Strings are Immutable.
How to take a portion of a string using a combination of three parameters: start, end, and step.
In this lecture, you will learn the most commonly used and helpful string methods in Python.
Why we will use the interactive shell for the coding sessions of this section.
How to write the statements in a Python file and see the output using print().
An interactive coding session with practical examples of the use of strings.
How to concatenate strings using the "plus" operator.
How to work with lists in Python.
How to define a list.
How to use indices to access their elements.
The basic characteristics of lists.
How to add, remove, and find elements in a list.
How to slice lists using different combinations of the parameters start, end, and step.
An interactive coding session with practical examples of the use of lists.
A detailed description of the most commonly used and helpful list methods.
A graphical explanation of nested lists.
How to work with tuples in Python.
The main characteristics of tuples.
How immutability changes the functionality of tuples.
How to find the number of occurrences of a value in a tuple.
The key functional difference between lists and tuples.
An interactive coding session with practical examples of the use of tuples.
A practical explanation of nested tuples.
How to work with dictionaries in Python.
The elements of dictionaries: key-value pairs.
The characteristics of keys and values.
How to access, add, remove, and modify a key-value pair to a dictionary.
A detailed description with examples of the most commonly used dictionary methods.
An interactive coding session with practical examples of the use of dictionaries.
A practical explanation of nested dictionaries.
How to work with Sets in Python.
The characteristics of Sets.
How to create an empty set.
How to add and remove elements from a set.
An interactive coding session with practical examples of the use of sets.
The difference between a set and a frozenset.
A link to a helpful complementary article on Sets and their operations.
What the term "iteration" means and why it is closely connected to loops.
The purpose and use cases of For Loops.
When and why you should use them.
How For Loops work behind the scenes.
A graphical explanation using a flowchart to explain the logic behind For Loops.
The general syntax used to write for loops in Python.
A practical coding session showing how to write a For Loop.
How to use indentation properly, following the official style guide of the Python language.
Detailed explanation of the role of the loop variable in for loops.
How to draw a spiral pattern using the turtle module.
Purpose and functionality of the range function.
How range works behind the scenes in a for loop.
The three parameters that you can use to customize the sequence of integers returned by range.
Why you should use the built-in range() function over lists and tuples to customize the functionality of For Loops.
How to see the sequence returned by range.
A practical coding session with examples of the use of range with one parameter.
The meaning and purpose of the start and end parameters in range.
The default value of the step parameter.
How to customize the sequence of integers returned by range with these two parameters.
A practical coding session with examples of the use of range with two parameters.
The purpose of the step parameter.
How to customize the step in the sequence of integers returned by the range function.
A practical coding session with examples of the use of range with three parameters.
A summary of the key aspects of the three parameters of range and their default values.
How to work with range and different combinations of negative arguments to generate sequences of integers.
Examples of the use of range with negative parameters.
How range objects are tested for equality.
A link to the official documentation of the built-in function range.
Introduction to the turtle module.
How to import the module.
How the coordinate system works.
How to call functions from the turtle module.
How to customize the aspect and speed of the pen.
Basics of the 2D coordinate system used in the turtle module.
Basics of angles and rotations.
How to move the turtle (pen) to draw a pattern.
How to move forward and backward
How to rotate right and left.
How to "jump" from one location to another before drawing again.
How to draw basic shapes using the turtle module (a square and a circle).
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.