You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#this is simply finding the maximum of random number if the user entred 0 finished the proccess
num=int(input("enter a number"))
maximum=num #first integer assign as a max number
if (num==0):
print("max num is 0") #if the first number is 0 just printed
else:
while (num!=0): #do it till entered 0
num=int(input("enter next number"))
#compare with previous number
if(maximum>num):
maximum
else:
maximum=num
print("max number in your range is", maximum)
The text was updated successfully, but these errors were encountered:
If this is a feature request, the built in max function will do what you want. If you're looking for help, please post to https://discuss.python.org/c/users/7
#this is simply finding the maximum of random number if the user entred 0 finished the proccess
num=int(input("enter a number"))
maximum=num #first integer assign as a max number
if (num==0):
print("max num is 0") #if the first number is 0 just printed
else:
while (num!=0): #do it till entered 0
num=int(input("enter next number"))
#compare with previous number
if(maximum>num):
maximum
else:
maximum=num
print("max number in your range is", maximum)
The text was updated successfully, but these errors were encountered: