Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
1いいね 97 views回再生

Lecture 10 Loops in Python; For loop, While loop | Python full course in Hindi | Project Guru

Python Programming - From Basics to Advanced level 2023 | Python for Beginners | Python full course in Hindi | The Complete Python Programming Course: Beginner to Advanced | Python Programming Full Course (Basics + Advanced) | Python 3: From Beginner to Advanced | Python For Beginner and Intermediate Learners | Everything About Python — Beginner To Advanced | How to learn Python from a beginner level | Python Tutorial for Beginners: Learn Programming Basics | Learn Python - Free Interactive Python Tutorial | Learn Python Programming | The ultimate introduction to Python in 2023 | Python Full Course for free | Python Tutorial For Beginners In Hindi (With Notes) 2023 | Python Tutorials For Absolute Beginners In Hindi | Python Tutorial - Python Full Course for Beginners | Learn Python - Full Course for Beginners Tutorial

Loop Control Statements
Statements used to control loops and change the course of iteration are called control statements. All the objects produced within the local scope of the loop are deleted when execution is completed.

For loop:- This type of loop executes a code block multiple times and abbreviates the code that manages the loop variable.
While loop:- Repeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body.
Nested loops:- We can iterate a loop inside another loop.

Python offers 3 choices for running the loops. The basic functionality of all the techniques is the same, although the syntax and the amount of time required for checking the condition differ. We can run a single statement or set of statements repeatedly using a loop command.
Break statement:- This command terminates the loop's execution and transfers the program's control to the statement next to the loop.
Continue statement:- This command skips the current iteration of the loop. The statements following the continue statement are not executed once the Python interpreter reaches the continue statement.
Pass statement:- The pass statement is used when a statement is syntactically necessary, but no code is to be executed.

Download the Notes for Python Basics to Advance series Lecture 10
Before proceeding ahead, please download lecture 9 notes using the link:- https://drive.google.com/drive/folder...

Python for loop
For loop in python is designed to repeatedly execute a code block while iterating through a list, tuple, dictionary, or other iterable objects of Python. The process of traversing a sequence is known as iteration.

Syntax of the for Loop

for value in sequence:
{ code block }

In this case, the variable value is used to hold the value of every item present in the sequence before the iteration begins until this particular iteration is completed. Loop iterates until the final item of the sequence are reached.

The range function()

With the help of the range() function, we may produce a series of numbers. We can give specific start, stop, and step size values in the manner range(start, stop, step size). If the step size is not specified, it defaults to 1.

for i in range(0,10):
print(i)

Python Basic to Advance Full Playlist:-    • Lecture 1: Introduction to Python | Python...  
__________________________________________________________

Other Python Projects:

Face Detection using Python:-    • Real time Face detection project using Pyt...  

QR Code Generator and Reader:-    • Python Project QR Code Generator with Sour...  

GUI Based Digital clock:-    • Create a digital clock using Tkinter | Tki...  

GUI Based Text Editor:-    • Build a basic Text Editor using Tkinter in...  

Virtual Assistant:-    • Build Iron Man Jarvis AI Desktop Voice Ass...  
__________________________________________________________

Connect with me:
Facebook:-   / ak.kmr  
Instagram:-   / ak.kmr111  
Email:- akshaydhiman685@gmail.com
__________________________________________________________
Subscribe:-    / @project_guru  

コメント