How can I modify my program to better work so it can follow this question: Write a conditional loop that will trap the user until they enter a value between 0 and 100. If the user enters any number outside of this range, they must enter a value again.
This is the code:
value = 0
badvalue = 0
while value < 100:
value = int(input("Enter a value between 0 and a 100:"))
value = value + 1
while badvalue >= 100:
print("Please re-enter the value")
badvalue = int(input("Enter a value between 0 and a 100:"))
badvalue = badvalue + 1