tab = True
while tab:
p = input("使用计算器?(y/q)")
if p == 'y':
a = float(input("输入数字1:"))
if a>999:
print("输入超过数值限额")
continue
b = float(input("输入数字2:"))
if b>999:
print("输入超过数值限额")
continue
else:
tab = False
z = a+b
print(f"{a}与{b}的和为{z}")
elif p == "q":
tab = False
else:
print("选项错误,请重新输入,",end='')