
这是我们最新研发的Python青少儿编程课中的一个演示程序,非教学程序。以下是完整代码:
"""
正弦定理演示程序.py
"""
__author__ = '李兴球'
__date__ = '2021/8/22'
import math
from turtle import Screen,Turtle,TurtleScreenBase
screen = Screen() # 新建窗口
screen.tracer(0,0) # 关闭自动显示
screen.setup(680,660) # 设定窗口大小
corturtle = Turtle(shape='blank')
corturtle.fd(340)
corturtle.bk(680)
corturtle.fd(340)
corturtle.left(90)
corturtle.fd(280)
corturtle.bk(560)
screen.update()
p = Turtle(shape='blank')
p.penup()
p.goto(-300,150)
s = '正弦定理演示程序'
p.write(s,font=('',24))
w = Turtle(shape='blank')
w.penup()
w.pensize(4)
w.speed(0)需要浏览更多吗?
成为会员后,登陆才能继续浏览!联系微信scratch8即可办理会员。
(会员专属:能浏览所有文章,下载所有带链接的Python资源。)
