Q. Write a short program to find largest number of the list of number entered through keyboard.
You can understand by Watching video :-
Answer :-
b = 0 while True : a = int(input("Enter a number (for quit enter 0 (zero) )= ")) if a == 0 or a == 0 : break else : if a > b : b = a print(b, "is biggest number.")
Output :-
Enter a number (for quit enter 0 (zero) )= 5
Enter a number (for quit enter 0 (zero) )= 4
Enter a number (for quit enter 0 (zero) )= 9
Enter a number (for quit enter 0 (zero) )= 7
Enter a number (for quit enter 0 (zero) )= 31
Enter a number (for quit enter 0 (zero) )= 14
Enter a number (for quit enter 0 (zero) )= 85
Enter a number (for quit enter 0 (zero) )= 693
Enter a number (for quit enter 0 (zero) )= 45
Enter a number (for quit enter 0 (zero) )= 20
Enter a number (for quit enter 0 (zero) )= 0
693 is biggest number.
>>>
damn nigga
ReplyDeleteyeaaahhhn niggggaaaa!!!!!!!!!
Deletewhat is break command used for
ReplyDeleteTo stop While loop or for loop.
Delete(nigga)ho me meri dekho jo hai bas gayaaa
ReplyDeleteSong is good.
Deletecan we make same code using for loop?
ReplyDeleteNo, because in this program you do not know when user will enter 0.
Deletei have done it brooo
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )