#计算器
num1 = float(input(“请输入第一个数:”))
ysf =input(“请输入运算符:”)
num2 = float(input(“请输入第二个数:”))
if ysf == “+”:
print("%s+%s=%s"%(num1,num2,(num1+num2)))
if ysf == “-”:
print("%s-%s=%s"%(num1,num2,(num1-num2)))
if ysf == “":
print("%s%s=%s”%(num1,num2,(num1*num2)))
if ysf == “/”:
print("%s/%s=%s"%(num1,num2,(num1/num2)))
if ysf == “%”:
print(“num1,”%“num2=%s”%(num1%num2))
if ysf == “//”:
print("%s//%s=%s"%(num1,num2,(num1//num2)))
if ysf == “":
print("%s%s=%s”%(num1,num2,(num1**num2)))
“”“健康计划
用户输入身高(m),体重(kg)
计算公式:BMI = 体重 / 身高^2
BMI < 18.5:过轻
18.5≤ BMI <24:正常
24 ≤ BMI <27:过重
27 ≤ BMI < 30:轻度肥胖