Consider the following code:
a) num = int(input("Enter a number, negative to stop"))
b) while (num >= 0):
print ("You entered: " + str(num))
c) num = int(input("Enter a number, negative to stop"))
print ("Done.")
What is wrong?
d) The num >= 0 test condition is not correct
There is nothing wrong with the code.
The line num = int(input("Enter a number, negative to stop")) should be indented so it is inside the loop
e) There should not be a : after the while (num >= 0)