While Loop in Python (Perform a Task 1000000 times With Ease) #8

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ม.ค. 2025

ความคิดเห็น • 208

  • @programizstudios
    @programizstudios  2 ปีที่แล้ว +1

    🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges.
    Try Programiz PRO: bit.ly/right-python

  • @keghushahembagabriel4764
    @keghushahembagabriel4764 4 ปีที่แล้ว +59

    I'm new to programming and I actually find your tutoring awesome.
    Thank you.

  • @smdsongs2625
    @smdsongs2625 4 ปีที่แล้ว +15

    Best TH-cam teacher . Thank you for the wonderful video with Tasks.... your way of speaking is awesome.

  • @hyper-thegamechanger3667
    @hyper-thegamechanger3667 3 ปีที่แล้ว +34

    yes sir i have got it without looking in git hub
    I just start coding yesterday, this video is very helpful. Code
    number = int(input('Enter a number:'))
    count = 10
    while count >= 1:
    product = number * count
    print (number, 'x', count, '=', product)
    count = count - 1

  • @niran_playzofficial5334
    @niran_playzofficial5334 3 ปีที่แล้ว +3

    8:18 I have completed the programing task myself thank you for your explanation and ur support

  • @dangerdemander6476
    @dangerdemander6476 3 ปีที่แล้ว +13

    for the programing task you can also do ;
    number = int(input("enter the number: "))
    count = 10
    while count =1 :
    product = number * count
    print(number,"*",count,"=",product)
    count -= 1
    hope it works for you all too

    • @fookivansh4667
      @fookivansh4667 2 ปีที่แล้ว

      thanks it helped me i was doing while count = 1

    • @dangerdemander6476
      @dangerdemander6476 2 ปีที่แล้ว

      @@fookivansh4667 yeah sure buddy 🙏

    • @Naveenbabuborugadda
      @Naveenbabuborugadda ปีที่แล้ว

      I haven't used "and" but made the answer changing 1 to 10 and 10 to 1. Also less that or equal to to greater than or equal to.

  • @Gayathrimitra
    @Gayathrimitra ปีที่แล้ว +1

    really I loved this channel

  • @BrokeCanadian
    @BrokeCanadian 4 ปีที่แล้ว +16

    This guy is the best teacher ever!

    • @TherealTNCjah
      @TherealTNCjah 2 ปีที่แล้ว

      Yeah like how is he so good God dam

  • @Alche__
    @Alche__ 2 ปีที่แล้ว +3

    Honestly sir! Your lessons are so clear and well laid out, thank you so much!!

  • @vedanshchn
    @vedanshchn 2 ปีที่แล้ว +2

    8:30 Solution:
    # Multiplication table reverse order
    num = int(input("Enter a number: "))
    count = 10
    while (count >= 1):
    print(num, "*", count, "=", (num * count))
    count -= 1

    • @joyceadhiambo9977
      @joyceadhiambo9977 2 ปีที่แล้ว

      HEY ved it works ...i have seen what i was missing. but remove the -= to -
      number = int(input('Enter number:'))
      count = 10
      while count >= 1:
      product= number* count
      print(number,'x',count,'=',product)
      count= count-1
      .Happy coding!!!!

  • @harsharaj6477
    @harsharaj6477 2 ปีที่แล้ว +2

    Programiz always is helpful for a beginner to learn and understand coding concepts! Looking forward to learning some more advanced concepts with better clarity and approach as always by tutor(Punit).

  • @tarabelbase8120
    @tarabelbase8120 4 ปีที่แล้ว +2

    **pythan program**
    While(You make video)
    {
    print("You channel grow very soon")
    }
    if(You stop Teaching)
    {
    print("Please continue Teaching")
    }
    **C program**
    #include
    int main()
    {
    int choose;
    do{
    while(You teaching)
    {
    printf("You channel grow very fast");
    if(You stop teaching)
    {
    printf("presh 1 for continue Teaching");
    scanf("%d",&choose);
    } while(choose);
    return 0;
    }

  • @faisalkhattak8608
    @faisalkhattak8608 3 ปีที่แล้ว +1

    8:36
    number = int(input("enter number: "))
    count = 10
    while count >= 1:
    product = number * count
    print(number, "X", count, "=", product)
    count = count - 1

  • @avantika6077
    @avantika6077 11 หลายเดือนก่อน +1

    Something I thought I understood months ago, after watching this, I made conclusions that I haven't understood it better, until now.

  • @kartikudainiya2328
    @kartikudainiya2328 4 ปีที่แล้ว +8

    a=int(input("enter a number:"))
    count=10
    while count >= 1:
    pro=count*a
    print(a, "X", count, "=", pro)
    count=count-1
    one time correct

  • @sureshvarthya2250
    @sureshvarthya2250 2 ปีที่แล้ว

    num=int(input("enter the number:"))
    i=1
    while i
    #while loop executes n no of steps in more than one line
    #print("Thank you sir, for your brilliant teaching")

  • @sanskarkumar464
    @sanskarkumar464 3 ปีที่แล้ว +15

    Yes, I do know most of you know the answer to make a reversed table of a number
    table = int(input('Enter a number for multiplication'))
    count = 10
    while count >= 1:
    answer = table*count
    print(table, "*", count, "=" ,answer)
    count -= 1

    • @cristianacrestani5941
      @cristianacrestani5941 3 ปีที่แล้ว

      table = int(input('Enter a number for multiplication'))
      count = 10
      while count >= 1:
      answer = table*count
      print(table, "*", count, "=" ,answer)
      count= count-1
      GREAT TUTORIAL: you guys rock!!!

    • @eunoshiiikw
      @eunoshiiikw 2 ปีที่แล้ว

      count = 1
      number = int(input("Enter a number: "))
      while count

  • @mohammadadibaslam1856
    @mohammadadibaslam1856 4 ปีที่แล้ว +1

    Great Explanation Bro!! pehli baar while function samajh main aaya...great job..

  • @horizontesoberano
    @horizontesoberano 2 ปีที่แล้ว +1

    brazil must be closer to india. we have very much to learn with you, brother. your polite, cool and very simply way to talk. that made us very comfortable to learn. thanx a lot buy sharing knowlodge. i wish to you and your people much luck and much health. fraternal hugs from a brazilian brother

  • @sayandutta3205
    @sayandutta3205 4 ปีที่แล้ว +3

    #TASK
    number = int(input("enter a number: "))
    count = 10
    while count >= 1:
    product = (number * count)
    print(number, "x" ,count, "=", product)
    count = count - 1

  • @samsquirkshop7388
    @samsquirkshop7388 2 ปีที่แล้ว

    These vids are some of the best learning material I've ever seen!

  • @meray2magdy975
    @meray2magdy975 4 ปีที่แล้ว

    actually you are awesome. probably the best youtube programmer

  • @poojashedge266
    @poojashedge266 2 ปีที่แล้ว +1

    Sir please continue this series .And please make advance topic aswell.Big thank you for the content.

  • @DigitalAcademyOnline
    @DigitalAcademyOnline 3 ปีที่แล้ว +1

    Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels

  • @banana_assasin3907
    @banana_assasin3907 2 ปีที่แล้ว

    this was very helpful and i also found it better to predict what youre going to do before you do it to see if I've learned

  • @Yogansh67
    @Yogansh67 2 ปีที่แล้ว

    Thank you sir for amazing teaching...
    Answer of the question
    no= int(input("enter ur no."))
    now=10
    while now >= 1:
    pro= no * now
    print(no , "x" , now , "=" , pro)
    now = now-1

  • @shakingitoff
    @shakingitoff 2 ปีที่แล้ว

    fun little random additions:
    main_loop = True
    import time
    while main_loop:
    number = input('Number: ')
    try: # executes test block below to check for errors
    int(number)
    loop_condition = True
    main_loop = False
    time.sleep(0.5) # delays program for dramatic effect
    print('Calculating...')
    time.sleep(1.2)
    except ValueError:
    print('Please enter integer value only')
    loop_condition = False
    loop_count = 0
    count = 10
    while loop_condition and loop_count < 10:
    multiple = int(number) * count
    print(str(number), '*', str(count), '=', multiple)
    count -= 1
    loop_count += 1

  • @aryadubbewar7446
    @aryadubbewar7446 2 ปีที่แล้ว

    You are the best teacher 🙂.

  • @hasnainabbas8757
    @hasnainabbas8757 3 ปีที่แล้ว

    Concepts are awesome ✨

  • @jonfortier3664
    @jonfortier3664 4 ปีที่แล้ว +1

    Absolutely Beautiful Lectures ..

  • @BabyMeraLearn
    @BabyMeraLearn 8 หลายเดือนก่อน

    Very nice video,easy to understand. Keep up the good work. God Bless You!

  • @r.itesh09
    @r.itesh09 4 ปีที่แล้ว +1

    Best explanation
    Thanks sir.....

  • @vivkkush
    @vivkkush 3 ปีที่แล้ว +5

    8:24
    n = int(input("write down the number : "))
    count = 10
    while count > 0:
    product = n * count
    print(n, "x", count, "=", product)
    count = count - 1

  • @kushpatelstudent6862
    @kushpatelstudent6862 2 ปีที่แล้ว

    these videos are very helpful, you got my sub

  • @hangon552
    @hangon552 2 ปีที่แล้ว +1

    a = int(input("Enter your number > "))
    b = 11
    while b>=2:
    b = b-1
    c = a * b
    print(a,"X",b,"=",c)

  • @amalaji5311
    @amalaji5311 3 ปีที่แล้ว

    num = int(input(''Enter a number = ''))
    sum = 0
    for x in range(1,num+1):
    sum = sum + x
    print(x ,end=' ')
    if x < num:
    print("+",end=" ")
    print("=",sum)

  • @divyaahirkar9183
    @divyaahirkar9183 3 ปีที่แล้ว +1

    number = int(input("Enter number"))
    count = 10
    while count >=1
    product = number*count
    print( number , "X" , count ,"=", product)
    count = count - 1

  • @chill.vibesn
    @chill.vibesn หลายเดือนก่อน

    thank you such a good tutorial!

  • @rosaf4661
    @rosaf4661 3 ปีที่แล้ว

    thank you so much! i really needed some guidance for my class.

  • @kartikudainiya2328
    @kartikudainiya2328 4 ปีที่แล้ว +4

    pls keep it free always because i will unable to pay and you explanation is best top superb ultimate awesome

  • @mahima979
    @mahima979 3 ปีที่แล้ว

    Thank you! V. helpful!!

  • @vaishnavi7203
    @vaishnavi7203 4 ปีที่แล้ว +1

    Very nice tutorial 👍

  • @henryohia8818
    @henryohia8818 3 ปีที่แล้ว

    Very understandable better then the other ones i have watched

  • @nomansiddique
    @nomansiddique 4 ปีที่แล้ว +6

    num = int(input("Enter the number :"))
    count = 10
    while count = 1 :
    product = num * count
    print(num, "x",count,"=",product)
    count = count - 1

    • @programizstudios
      @programizstudios  4 ปีที่แล้ว +5

      Nice work. There is a suggestion however. We do not need to check "count = 1".

    • @choureabhishek7512
      @choureabhishek7512 3 ปีที่แล้ว

      Thanks For Code 🙏🏻😊

  • @HSN.LTD0824
    @HSN.LTD0824 ปีที่แล้ว

    Thanks mate! I couldn't understand the idea of i+=1. Now I know the way you explained is we can write either count +=1 or count = count+1. Thank you.

  • @vrushalibhise7375
    @vrushalibhise7375 3 ปีที่แล้ว +4

    ##for that reverse table of 6 :
    num=int(input("Enter your number:"))
    count= 10
    while count >= 0 :
    product = number * count
    print(num, "x" , count, "=" , product)
    count = count - 1
    I wrote this code and it worked! Thanks for the video!!!!!!!!!!!!! ^_^

    • @damaxtityleze
      @damaxtityleze 2 ปีที่แล้ว

      damn thanks, in line - while count >= 0 , i just put count = 0 and it doesn't work :)

  • @CallmeMrRoyal
    @CallmeMrRoyal 2 ปีที่แล้ว

    Thank you for the videos, your explanation is so much clear and simple, it makes me to understand logical behind

  • @adabujiki
    @adabujiki 2 ปีที่แล้ว

    Veryy, Verryyy good explaination of the details of while-loops, he explains every line, and its effect. THANK YOU!!

  • @evilnikhil6021
    @evilnikhil6021 4 ปีที่แล้ว +1

    👍👍👍 I need this content

  • @adityapatel520
    @adityapatel520 2 ปีที่แล้ว +1

    reverse table
    def adi ():
    num= int(input("enter a number : "))
    print ("multiplication table of " , num , "is :-" )
    n = 10
    while n >= 0:
    pro= num * n
    print(num , "x", n, "=", pro)
    n-=1

    >>> adi()
    enter a number : 9
    multiplication table of 9 is :-
    9 x 10 = 90
    9 x 9 = 81
    9 x 8 = 72
    9 x 7 = 63
    9 x 6 = 54
    9 x 5 = 45
    9 x 4 = 36
    9 x 3 = 27
    9 x 2 = 18
    9 x 1 = 9
    9 x 0 = 0

  • @hellaevie
    @hellaevie 3 ปีที่แล้ว

    Thank you! clean explanation so that I can complete a hw assignment! before I watch the next vid on "for loops" good rec on the app! love the option being able to continue learning :)

  • @vedanshchn
    @vedanshchn 2 ปีที่แล้ว

    I managed to write this!
    # Mutiplication table
    num = int(input("Enter a number: "))
    count = 1
    while (count

  • @abhiramanne9649
    @abhiramanne9649 4 ปีที่แล้ว +3

    you ppl are working hard! thankyou SOO much!

  • @SamuelSantos-bx2rh
    @SamuelSantos-bx2rh 3 ปีที่แล้ว

    this is a very clear lecture, thanks!

  • @life-yq7zp
    @life-yq7zp 2 ปีที่แล้ว

    Thank u soo much SIR ,totally helpful

  • @hunterr1330
    @hunterr1330 3 ปีที่แล้ว +2

    I am a beginner in python!(aslo i have a doubt!)
    How to add loop when an operation is executed,i mean if i executed a sum on calculator (made by me through python) then i made a statement which says that if the calculation is over then type "y" and if not (if they want to continue solving sums) then type "n" then,how can i loop that python code for calculator by to loop / for loop??? Please help me out!

  • @sohamsrkr
    @sohamsrkr 3 ปีที่แล้ว

    thank you so much i really found this useful in my recent project

  • @kimbo5175
    @kimbo5175 2 ปีที่แล้ว

    I can only ecoh what others have said already, thank you!

  • @AbdulRahman-qv1kj
    @AbdulRahman-qv1kj 3 ปีที่แล้ว

    print("-----------------multiplication table-----------------")
    number=int(input("which table do you want?"))
    count = 10
    while count >= 1:
    product = number * count
    print(number, "x", count, "=", product)
    count = count - 1

  • @Randomvidd3
    @Randomvidd3 2 ปีที่แล้ว

    This video is very helpful ❤

  • @hanshrajkumar7884
    @hanshrajkumar7884 3 ปีที่แล้ว

    Thank you so much sir❤️

  • @saravanapothi574
    @saravanapothi574 4 ปีที่แล้ว +4

    num=int(input("Enter the number:"))
    count = 10
    while count >=1:
    Product =count*num
    print(num,"x", count, "=", Product)
    count=count - 1

  • @praveenasurya3211
    @praveenasurya3211 3 ปีที่แล้ว +1

    Hi sir,Can you please provide more examples on while and for loop?

  • @mdiftekhar6876
    @mdiftekhar6876 3 ปีที่แล้ว

    number=int(raw_input("enter the table:"))
    count=10
    while count=1:
    product=number*count
    print(number, "x",count,"=", product)
    count = count - 1

  • @mrziyaad01
    @mrziyaad01 2 ปีที่แล้ว

    If you have written loads of lines of code already, how would you get that code into a while loop so the program can repeat itself?

  • @cubez7
    @cubez7 10 หลายเดือนก่อน

    It is very helpful

  • @shadymohamed7017
    @shadymohamed7017 ปีที่แล้ว

    u r amazing. thanks

  • @adegbamiyestephen2521
    @adegbamiyestephen2521 3 ปีที่แล้ว

    Very Good Video I've been looking for a specific solution to this type of problem but your video has really help me thanks one more time

  • @memineand
    @memineand 4 ปีที่แล้ว

    Thank you so much
    It helped me to solve me my queries 😌

  • @yogeshabd5235
    @yogeshabd5235 3 ปีที่แล้ว

    bro, u are u doing great work.

  • @aritradey7189
    @aritradey7189 2 ปีที่แล้ว

    # Reverse multiplication table:
    number=int(input("Enter a number: "))
    count = 10
    while count >= 1:
    product=number * count
    print(number , "*" , count , "=" ,product)
    count=count-1

  • @dolfinho87
    @dolfinho87 2 ปีที่แล้ว

    Excelente! Thanks!

  • @kurakulakalyan987
    @kurakulakalyan987 3 ปีที่แล้ว

    a=int(input('enter the number:'))
    count=10
    while count0:
    product=a*count
    print(a,'*',count,'=',product)
    count=count-1

  • @pkanyaa4988
    @pkanyaa4988 2 ปีที่แล้ว

    answer for the practice question :
    number = int(input("enter the number: "))
    count = 10
    while count>0:
    product = number*count
    print(number, "*", count, "=", product)
    count = count - 1

  • @astroloxi8133
    @astroloxi8133 3 ปีที่แล้ว

    is endif and endwhile used in python or is that in pseudocode?

  • @sripranav
    @sripranav 4 ปีที่แล้ว +1

    Can I stop a loop from outside the loop! I want it very badly! I can't place the function inside the loop! So I have to get it from outside

    • @programizstudios
      @programizstudios  4 ปีที่แล้ว

      There is no way to end a loop from outside.
      Did you check the break statement? It can be used to end the loops abruptly without checking the test condition. Maybe it can fix your issue.

  • @anish1981
    @anish1981 2 ปีที่แล้ว

    तपाईं नेपाली जस्तो लाग्यो, anyways u are doing great and we appreciate your time in helping us learn python.

  • @saramahmoud8034
    @saramahmoud8034 3 ปีที่แล้ว

    amazing. thanks a lot

  • @Project.i
    @Project.i 9 หลายเดือนก่อน

    #reverse multipication table using while loop
    number= int(input("Enter a number: "))
    count= 10
    while count>=1:
    equals= number * count
    print(number, "*", count,"=", equals)
    count = count - 1

  • @sandipansarkar9211
    @sandipansarkar9211 4 ปีที่แล้ว

    great explanation

  • @kushanchaudhary5930
    @kushanchaudhary5930 3 ปีที่แล้ว +1

    how to repeat full program using an element input as an indicator by the user ?
    I am actually building a calculator which can output a remainder or quotient of two numbers, i want to kmow how to repeat the full program so that the user might not need to run it again and he can rerun just by inputing an element.

    • @dagdbot83
      @dagdbot83 3 ปีที่แล้ว

      Send the code

  • @benjaminxiong553
    @benjaminxiong553 4 ปีที่แล้ว +2

    Im taking AP CSP and this video omfg clarified a while loop so much ty

  • @zainulabdeen7074
    @zainulabdeen7074 2 ปีที่แล้ว

    number = int(input("enter anumber "))
    count = 10
    while count0:
    product=number * count
    print(number, "x", count, "=", product)
    count = count - 1

  • @wildmerbotplaysdbd
    @wildmerbotplaysdbd 2 ปีที่แล้ว

    Thank you

  • @crafty329
    @crafty329 3 ปีที่แล้ว

    Omg thank you so much

  • @sukakomen4835
    @sukakomen4835 3 ปีที่แล้ว

    number=int(input("Enter a number:"))
    count=10
    while count>0:
    product=number*count
    print('{} * {} = {}'.format(number,count,product))
    count-=1

  • @priyanpriyankan7014
    @priyanpriyankan7014 2 ปีที่แล้ว

    answer to the 8.13
    number = int(input("enter a number: "))
    count= 10
    while count >0:
    product = count * number
    print(number, '*', count, "=" , product)
    count = count -1

  • @osirisestela3414
    @osirisestela3414 2 ปีที่แล้ว

    thanks man!

  • @NGOFFICAL9
    @NGOFFICAL9 2 ปีที่แล้ว

    Programming Task
    num=int(input("enter a number:"))
    count =10
    while(count>0):
    product=count*num
    print(num,"x",count,"=", product)
    count=count-1
    OUTPUT
    enter a number:6
    6 x 10 = 60
    6 x 9 = 54
    6 x 8 = 48
    6 x 7 = 42
    6 x 6 = 36
    6 x 5 = 30
    6 x 4 = 24
    6 x 3 = 18
    6 x 2 = 12
    6 x 1 = 6

  • @ASITGOYAL_COMMONMAN
    @ASITGOYAL_COMMONMAN 2 ปีที่แล้ว

    # program to tell table upto ten
    count = int(input('which table do i tell you? '))
    multiple = 1
    while multiple

  • @glennswhiffmontage9397
    @glennswhiffmontage9397 3 ปีที่แล้ว

    is it wrong if i used break?

  • @mrt8bit692
    @mrt8bit692 2 ปีที่แล้ว

    I GOT THE CODE THAT WORKS!
    number = int(input("Enter a Number 1 Through 12: "))
    count = 12
    while count >= 1:
    product = number * count
    print(number, "x", count, "=", product)
    count = count - 1

  • @reallysumeetz
    @reallysumeetz 3 ปีที่แล้ว

    #Multiplication Table
    num = int(input("Enter num: "))
    count = 10
    while count >= 1:
    product = num*count
    print(num, "x", count, "=", product)
    count = count - 1

  • @shubhampandey6706
    @shubhampandey6706 2 ปีที่แล้ว

    #printing table in reverse order
    num=int(input("Enter a number"))
    count=10
    while count>=1:
    product=count*num
    print(num,'x',count,'=',product)
    count=count-1

  • @hackkitts9254
    @hackkitts9254 3 ปีที่แล้ว +2

    anyone have any help for making a machine that repeats "hello" every 2 minutes????

    • @programizstudios
      @programizstudios  3 ปีที่แล้ว +3

      import time
      while True:
      print("hello")
      time.sleep(2*60)

  • @Life-zx5wp
    @Life-zx5wp 3 ปีที่แล้ว

    how can stop while loop with a button but don't use thread?

  • @abhaymehta3770
    @abhaymehta3770 2 ปีที่แล้ว

    sir, can you help me to find maximum and minimum number from the numbers that are entered by user using while loop ?

  • @ponenik1691
    @ponenik1691 4 ปีที่แล้ว +1

    good content! :)

  • @vamshid-gp8pw
    @vamshid-gp8pw 8 หลายเดือนก่อน

    number = int(input("Enter a number:"))
    count = 10
    while count>=1:
    product = number*count
    print(number, "x", count, "=", product)
    count = count - 1 test done sir

  • @joyceadhiambo9977
    @joyceadhiambo9977 2 ปีที่แล้ว

    hey i got my answer but it wont stop looping. What am i missing
    number = int(input('Enter number:'))
    count = 10
    while count