Converting While Loop Programs to For Loop in Python | In Hindi
HTML-код
- Опубликовано: 14 окт 2024
- Converting While Loop Programs to For Loop in Python | In Hindi
Telegram Channel: t.me/codeitupyt
Telegram Chat Group: t.me/codeitupchat
In this video, I have explained the basics of loop and further about for loop. Going further in this same video, I have explained how to convert while loop programs in for loop. Converting while loop programs to for loop in python is very easy if you know the basic concepts of loop.
Join this channel to get access to perks:
/ @codeitup
Link to Previous Video: • Mostly Asked Viva Ques...
Link to next video: • Nested For Loop In Pyt...
Facebook Group: / 21673. .
Instagram: / codeitupyt
Facebook Page: / notifications
Website: codeitup.in
Tags Used:
codeitup
codeitup python
python class 12
class 12 python
cbse class 12 python
converting while loop programs to for loop
converting while loop programs to for loop in python
how to convert while loop program to for loop in python
python tutorial for beginners
python for beginners
python tutorials for beginners
python language
for loops python
for loops in python
for loops python 3
for loops python examples
python json loads
for loop python pandas
for loop python code
for loop python command line
#codeitup
#pythonloop
#python
thank you so much sir really your explain very well 🥰🥰❤❤❤❤❤❤❤
Most welcome Jaiprakash!
I dont know how do you find a so much easy way to explain so difficult problems sir. Hats Off to you sir.
Thanks a lot Akshay for your lovely comment😊
@@codeitup SIR PLEASE DS ALGO SERIES BANA DIJIYE LOVE BABBAR SDE SHEET SE YA STRIVER SDE SHEET SE HINDI ME SARE QUESTIONS SOLVED HAI FOR LOVE BABBAR GEEKS FOR GEEKS ME
Yr itna accha pdaya inhone aur 1000 se km likes aur 20k views?
Glt baat baccho😮
Bahut accha pdaya aapne sir❤
a = int(input( " Enter a Lower Limit : " ))
b = int(input( " Enter a Upper Limit : " ))
so = 0
se = 0
pe = 1
po = 1
for i in range(a, b + 1):
if(i%2==0):
se = se + i
pe = po * i
else :
so = so + i
po = po * i
print( " Sum of the Even Number : ", se)
print( " Sum of the Odd Number : ", so)
print( " Product of the Even Number : ", pe)
print( " Product of the Odd Number : ", po)
It WORKED SIR.... Thank u sir........
your teaching with a smile in your face, " I LIKE IT "👍👍👍👍👍👍👍👍👍
Thanks dear😊
You made it so easy on other channel it is made very hard to understand. Thanks sir
Glad to hear that!
Seriously this is so helpful it deserves 1M likes actually, very simple explanation thank you you much sir, my exam is tmrw and I was searching for easy ones and your vid explained everything thx so much
Glad to help you & best of luck for your exam!
are sir ye playlist is very nice kal mera cs ka paper hai apke videos dekh ke sab samaj mai agaya aap explain bohot acha karte ho
Thanks Pruthiviraj, keep learning😊
Sir You are super!!! Thankyou for teaching us
Thanks and welcome!
# For loop without start value - 0 to 10
for i in range(11):
print(i)
# start value - 1 to 10
for i in range(1,11):
print(i)
# Increase by 2 range(start value, end value, increamental value)
# start value=1, End Value=10, increment value=2
for i in range(1,11,2):
print(i)
# Print numbers from 10 to 1
for i in range(10,0,-1):
print(i)
# Print 2 to 20
for i in range(2,21,2):
print(i)
Jabarjast padhawela guru...ek no. per ek series practice k bhi banava 200-300 questions karwa da plz.
How many of u guys want more practice, plz comment here.
sir please ek baar ek video kha while loop use karte hai aur kha for loop use karte hai ek baar acche se exmplain kar digiye . kyo ki sir app ne jo btaya hai sum app digit to dono me ho sakta hai.
num=input("Enter a number:")
sum=0
for n in num:
sum = sum + int(n)
print(sum)
#### same program by while loop
i = int(input('ENTER YOUR NUM'))
sum = 0
while (i>0):
sum = sum+i%10
i=i//10
print(sum)
number = int(input("Enter a number: "))
total_sum = 0
# Convert the number to a string to iterate through its digits
for digit_char in str(number):
digit = int(digit_char)
total_sum += digit
print("The sum of the digits is:", total_sum)
you teach us at 14:45 duration that we can do this by for loop. now i am helping you to do this in different way and challenging you please give me a question which will done by while but not possible by for loop
Computer wallah 🥰
😊
Sir You are the best teacher to explain such concepts like a cakewalk
Thanks a lot Antik!
Thank you sir❤
Most welcome!
SIR PLEASE PLEASE HUGE REQUEST TO CREATE A SEPERATE PLAYLIST OF SESSION 2020-21 WITH NO DELETED TOPICS PLEASE SIR SO THAT WE CAN WATCH YOUR VIDEOS CONFIDENTELY
You are the best👍💯 thank you
Most welcome Pooja!
sir you're amazing.♥
hlw sir ji thanku for all you do for us 😍🤗
Sir you are best
🙂
# to add the digits using while loop
i = int (input ("Enter the number : "))
sum = 0
while i > 0 :
sum = sum + i %10
i = i //10
print (sum)
# to add the digit using for loop
a = input ("Enter the number : ")
sum = 0
for i in a :
sum = sum + int (i )
print (sum )
Attendance of 2024....😅here plz....also hats off to u sir🎉🎉
Thanks a lot sir
Most welcome!
sir can you please explain , new pattern of exam(2021-2022) term 1st mcq based k question kaise aayenge? sir passing marks kaise laye?? (CBSE BOARD)
Love the video
🙂
Sir For loop me initialize bhi kr diya And increment/Decrement bhi but condition to lgaayi hi nhi h hmne🙄
Serial No. Ko print krne me Koi condition kyu nhi lg rhi.
Thankuu so mucch sirr❤❤
Most welcome Mansi!
👏
😊
Sir please answer this write a menu driven python program to update the marks of named keerthika to 460
For class 12 python
Class 12 new batch kab start hoga
At this stage I think no batch is going to be started. However, you may mail to:
codeitupofficial@gmail.com
It's ammazing
Thanks Jayant!
You are given a dictionary priceList = {"Pen" : 10, "Pencil" : 5,
"Eraser" : 5, "Ruler" : 20}, representing products and their rates.
write a function rate that accepts this dictionary along with the name of a
product and returns the price of that product. If the product does not exist in the
dictionary, then it should return -1. For example, if the name of the product is
Ruler then the function should return 20.
Sir please help me out in this problem of python programming..
def search(priceList,key):
flag=0
for i in priceList:
if i==key:
flag=1
return priceList[i]
if flag==0:
return -1
#__main__
priceList={"Pen":10,"Pencil":5,"Eraser":5,"Ruler":20}
key=input("Enter Item to be searched:")
val=search(priceList,key)
if val==-1:
print("Element Not Found:")
else:
print("The Price of ",key," is=",val)
@@codeitup thanks alot sir..😊😊
one day before exam 😂🤝
👍
Please reply sir 🙏 🙏
At this stage I think no batch is going to be started. However, you may mail to:
codeitupofficial@gmail.com
I feel like he is bihari....
Yes, I'm Bihari 😊