Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#find_max_num #113685

Closed
yigitnazli opened this issue Jan 3, 2024 · 1 comment
Closed

#find_max_num #113685

yigitnazli opened this issue Jan 3, 2024 · 1 comment

Comments

@yigitnazli
Copy link

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

@itamaro itamaro closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2024
@ericvsmith
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants