min1=0
max1=0
while True:
num=input("enter a number")
if (num=='done'):
break
elif (num.isdigit()==False):
print("sorry enter integers or done")
elif (int(num)>max1):
max1=num
elif (int(num)<min1):
min1=num
print(max1)
print(min1)
This is throwing error '>' not supported between instances of 'int' and 'str'. I cannot take integer input as I have to break when the user enters done. Also, I have to account for non-integer values entered by user. How to rectify this code.