Need help finding the smallest number and ending the program with -1. This is what I got H = int(input(\"Enter a number or enter -1 to end)\"))
smallest = H

counter=0
while(True):
number = int(input(\"Enter a number: \"))
if(number == -1):
break
if(number < H):
smallest = number
print(number, \"is the smallest\")

Let me know What I\'m doing wrong please
Answer
1 (1 star)
0
25kc0690 1 year ago
23 response - 0 helps

Answer: your not doing anything wrong it is all good but you need to add a little more to it

Explanation:

Still have questions?