wenduzhuanhuan2
wendu=input("请输入带有符号的温度:")
if wendu[-2:] in ['fa','Fa']:
C=(eval(wendu[0:-2])-32)/1.8
print ("转换的温度是{:.2f}C".format(C))
elif wendu[-2:]in['ce','Ce']:
F=1.8*eval(wendu[0:-2])+32
print("转换后的温度是{:.2f}F".format(F))
else:
print("输入格式有错误")
wenduzhuanhuan3
wendu=input("请输入带有符号的温度:")
if wendu[0] in ['f','F']:
C=(eval(wendu[1:])-32)/1.8
print ("转换的温度是{:.2f}C".format(C))
elif wendu[0]in['c','C']:
F=1.8*eval(wendu[1:])+32
print("转换后的温度是{:.2f}F".format(F))
else:
print("输入格式有错误")
import turtle
turtle.setup(650,350,200,200)
turtle.penup()
turtle.fd(-250)
turtle.pendown()
turtle.pensize(25)
turtle.pencolor("purple")
turtle.seth(-40)
for i in range(4):
turtle.circle(40,80)
turtle.circle(-40,80)
turtle.circle(40, 80/2)
turtle.fd(40)
turtle.circle(16,180)
turtle.fd(40 * 2/3)
浙公网安备 33010602011771号