![](https://i-blog.csdnimg.cn/blog_migrate/080f0e51fcf2d2b87c9f0451a086f299.png)
from turtle import *
pensize(5)
pencolor('green')
fillcolor('red')
begin_fill()
while True:
fd(200)
right(144)
if abs(pos()) <1:
break
end_fill()
![](https://i-blog.csdnimg.cn/blog_migrate/243e4ef60c5be7d150d79f1051a16bfa.png)
TempStr = input("请输入带有符号的温度值:")
if TempStr[-1] in ['F','f']:
C = (eval(TempStr[0:-1])-32)/1.8
print("转换后的温度是{:.2f}C".format(C))
elif TempStr[-1] in['C','c']:
F = 1.8*eval(TempStr[0:-1])+32
print("转换后的温度是{:.2f}F".format(F))
else:
print("输入格式错误")
![](https://i-blog.csdnimg.cn/blog_migrate/072d06d88f0591c05ac959d7dff51d95.png)
import turtle
turtle.pensize(2)
turtle.circle(10)
turtle.circle(40)
turtle.circle(80)
turtle.circle(160)
![](https://i-blog.csdnimg.cn/blog_migrate/81ce5fa55eec7a8c8958de4958a8c95a.png)
r = 25
area = 3.1415 * r * r
print(area)
print("{:.2f}".format(area))