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

Комментарии • 62

  • @JaiprakashSodi-hz3qh
    @JaiprakashSodi-hz3qh 8 месяцев назад

    thank you so much sir really your explain very well 🥰🥰❤❤❤❤❤❤❤

    • @codeitup
      @codeitup  8 месяцев назад

      Most welcome Jaiprakash!

  • @akshayjain7636
    @akshayjain7636 3 года назад +15

    I dont know how do you find a so much easy way to explain so difficult problems sir. Hats Off to you sir.

    • @codeitup
      @codeitup  3 года назад +2

      Thanks a lot Akshay for your lovely comment😊

    • @dhruvsharma9230
      @dhruvsharma9230 2 года назад

      @@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

  • @Vibeshai
    @Vibeshai 4 месяца назад +2

    Yr itna accha pdaya inhone aur 1000 se km likes aur 20k views?
    Glt baat baccho😮
    Bahut accha pdaya aapne sir❤

  • @RumaPatra-sz2zi
    @RumaPatra-sz2zi 4 месяца назад

    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........

  • @onlycoc7599
    @onlycoc7599 3 года назад +6

    your teaching with a smile in your face, " I LIKE IT "👍👍👍👍👍👍👍👍👍

    • @codeitup
      @codeitup  3 года назад +2

      Thanks dear😊

  • @keshavagarwal5639
    @keshavagarwal5639 Год назад +2

    You made it so easy on other channel it is made very hard to understand. Thanks sir

  • @kingtechnology1062
    @kingtechnology1062 2 года назад +4

    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

    • @codeitup
      @codeitup  2 года назад

      Glad to help you & best of luck for your exam!

  • @pruthvirajsinhzala4441
    @pruthvirajsinhzala4441 2 года назад

    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

    • @codeitup
      @codeitup  2 года назад +1

      Thanks Pruthiviraj, keep learning😊

  • @luciferraze3590
    @luciferraze3590 Год назад +2

    Sir You are super!!! Thankyou for teaching us

    • @codeitup
      @codeitup  Год назад +1

      Thanks and welcome!

  • @MalegaonDiary
    @MalegaonDiary Месяц назад

    # 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)

  • @harshsingh5762
    @harshsingh5762 2 года назад

    Jabarjast padhawela guru...ek no. per ek series practice k bhi banava 200-300 questions karwa da plz.

    • @harshsingh5762
      @harshsingh5762 2 года назад

      How many of u guys want more practice, plz comment here.

  • @deepakmishra2779
    @deepakmishra2779 2 года назад

    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)

  • @RahulKumarSinghaniya-d6m
    @RahulKumarSinghaniya-d6m Год назад

    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

  • @motivation_factory_001
    @motivation_factory_001 2 года назад +4

    Computer wallah 🥰

  • @ankitanand1046
    @ankitanand1046 2 года назад +2

    Sir You are the best teacher to explain such concepts like a cakewalk

    • @codeitup
      @codeitup  2 года назад +1

      Thanks a lot Antik!

  • @arpitapandey8645
    @arpitapandey8645 Год назад +1

    Thank you sir❤

  • @rishabh9903
    @rishabh9903 3 года назад +4

    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

  • @PoojaVerma-mc3lh
    @PoojaVerma-mc3lh 9 месяцев назад

    You are the best👍💯 thank you

    • @codeitup
      @codeitup  9 месяцев назад

      Most welcome Pooja!

  • @haisesasaki3572
    @haisesasaki3572 Год назад

    sir you're amazing.♥

  • @AnuragMishra-ob1er
    @AnuragMishra-ob1er Год назад

    hlw sir ji thanku for all you do for us 😍🤗

  • @adarshraiwal6194
    @adarshraiwal6194 Год назад +1

    Sir you are best

  • @python8888
    @python8888 2 года назад

    # 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 )

  • @Funwithpaperalso2008
    @Funwithpaperalso2008 4 месяца назад

    Attendance of 2024....😅here plz....also hats off to u sir🎉🎉

  • @lbath76
    @lbath76 Год назад

    Thanks a lot sir

  • @vikassonkar861
    @vikassonkar861 3 года назад

    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)

  • @sanatanbharat1947
    @sanatanbharat1947 Год назад

    Love the video

  • @lavsingh2175
    @lavsingh2175 3 года назад

    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.

  • @mansisingh2434
    @mansisingh2434 2 года назад

    Thankuu so mucch sirr❤❤

    • @codeitup
      @codeitup  2 года назад

      Most welcome Mansi!

  • @vanshikagupta7689
    @vanshikagupta7689 2 года назад +1

    👏

  • @anilsingh62110
    @anilsingh62110 3 года назад

    Sir please answer this write a menu driven python program to update the marks of named keerthika to 460

  • @nextstep954
    @nextstep954 3 года назад +1

    Class 12 new batch kab start hoga

    • @codeitup
      @codeitup  3 года назад

      At this stage I think no batch is going to be started. However, you may mail to:
      codeitupofficial@gmail.com

  • @suruchisingh4155
    @suruchisingh4155 3 года назад

    It's ammazing

  • @pranavverma4169
    @pranavverma4169 3 года назад

    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..

    • @codeitup
      @codeitup  3 года назад +4

      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)

    • @pranavverma4169
      @pranavverma4169 3 года назад

      @@codeitup thanks alot sir..😊😊

  • @deepakkarki3179
    @deepakkarki3179 2 года назад

    one day before exam 😂🤝

  • @nextstep954
    @nextstep954 3 года назад

    Please reply sir 🙏 🙏

    • @codeitup
      @codeitup  3 года назад

      At this stage I think no batch is going to be started. However, you may mail to:
      codeitupofficial@gmail.com

  • @bijaymahato1798
    @bijaymahato1798 3 года назад +2

    I feel like he is bihari....

    • @codeitup
      @codeitup  2 года назад

      Yes, I'm Bihari 😊