how to fix this code that i can input float number
x = 0
y = x
count = 0
while True:
x = input("please enter student's grade: ")
if x == "quit" or x == "exit":
break
if x.isdigit():
x = float(x)
if (x >= 0) and (x <= 20):
y += x
count += 1
z = y / count
print(f"your students average grade is {z}")
else:
print("please enter a number between 0 and 20")
else:
print("input must be number")
i got "input must be number" when i input a float number