Loop with else in python | for ..else | while..else | Python Tutorial #33

preview_player
Показать описание
In this video, we are going to learn how to use else clause with loops in python programming.

#learncodewithdurgesh #durgeshtiwari #pythontutorial

___________________________________________________________________
topic covered:
else with loop in python,
else with loop in python hindi,
how to use else clause with loop in python,
for with else with in python,
while with else in python,
how to use else with for in python,
how to use else with while
Рекомендации по теме
Комментарии
Автор

Sir is this important ro use while<num

iitisro..
Автор

Thank sir this video is very helpful for me ❤

madhutanwar
Автор

Sir, as you have explained that if use break statement then else does not work otherwise it will work. But now here I am with a program to check prime numbers in python.

num=int(input("Enter a no.")
if num ==1:
print("not prime")
if num>1:
for i in range(2, num):
if num%i==0:
print("not prime")
break
else:
print("prime no.")


Sir in this program we have used break statement with else. But still the program is running ...
May you please tell the reason, sir ?....

samikshaverma
Автор

Sir question ye hai ki agar ham else na lgaye phir bhi ye sab hoga jo else lga kar kar rhe hai

laljee
Автор

Java bhi sir se sikhi
And Python bhi sir si sikhi
🙏

lovetyagi
visit shbcf.ru