a = 1
b = ""
while a != b :
a = float(input("enter value a: "))
b = float(input("enter value b: "))
if a == b:
print("Thats correct")
elif a > b:
print("a is higher")
elif b > a:
print("b is higher")
else:
print("not correct input, please try again"
如何更改代码,以便在测试a或b的输入值为字符串时,循环会继续?如果输入值相同但都是字符串,则循环也需要继续。