Answers for "when to use <= in while loop"

4

while loop

h=0
m=7
while a<7:
    for m in range(7):
        h+=1
        m-=1
        print(a,b)
        if m==1 or h==1:
         break
Posted by: Guest on November-29-2021
4

while loop

#input                                    # output
a=6                                        quantity of commodity=   
b=int(input("quantity of commodity="))     sampoo 
i=1                                        sampoo
while i <= b :                             sampoo
    if i>a:                                sampoo
        print("hello")                     sampoo
        break                              sampoo
    print('sampoo')                        hello  (it is printed when a<=7) 
    i+=1                                   thank you for coming
print("thank you for coming")
Posted by: Guest on November-20-2021

Code answers related to "when to use <= in while loop"

Python Answers by Framework

Browse Popular Code Answers by Language