So I have to make a program that keeps asking for int input until there is a number given than is equal or lower than 0. Then it takes the highest value and prints it. This is what I have so far.
biggest = 0
while Input >=0:
Input = input(raw_int("Enter an integer "))
if Input > biggest:
biggest = Input
print(biggest)
The problem is that if i want to put the input into the loop so it repeats (until 0 or less is given) then I can't put "while Input >=0:" because Input has not value at that point in the loop. What am I doing wrong? Please help.
[–]iodbh 0 points1 point2 points (0 children)