<

Python Programming: While and For Loops

Posted on
6,243 Points
143 Views
1 Endorsement
Last Modified:
Experience Level: Beginner
4:08
Learn the basics of while and for loops in Python.

Video Steps

1. while loops are used for testing while, or until, a condition is met

2. The structure of a while loop is as follows: while <condition>: do something repeate

3. The break statement may be used to exit a while loop when a condition is met

4. for loops iterate through a sequence or range a specified amount

5. The structure of a for loop is as follows: for <every element> in a <a sequence or range>: do something

6. The continue statement may be used to exit an iteration of a for loop, but not the loop itself.

1
Comment
Author:Dototot
0 Comments

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Join & Write a Comment

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
To hire android app developers, you need to know if the person you are looking for is suited for the job. When you surf the web for “Android app developers for hire” or anything close to that you will find results listing sites where programmers and…

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month