I am trying to find max and min number without using lists I know some information exist about this subject in here but mine is some different.I want numbers from the users.I am gonna continue to get the numbers until they enter -1.I could not find the solution. Here is the code:
count=1 while count != -2: number=int(input("number:")) max=number min=number if number != -1: count+=1 elif number == -1: if number > max: max = number print("max{}".format(max)) if number < min: min = number print("min{}".format(min)) break:
cur_maxandcur_min