克格勃御用信鸽 2021-12-23 10:56 采纳率: 0%
浏览 37

python模拟时钟,如何分别设置三个表针的粗细

表盘上时针分针秒针部分的源代码如下

def init():
    global S, Min, Hour, printer
    mode("logo")
    S=Turtle( )         # 秒针
    make_hand("S",245)
    S.shape("S")
    Min=Turtle( )       # 分针
    make_hand("Min",180)
    Min.shape("Min")
    Hour=Turtle( )      # 时针
    make_hand("Hour",120)
    Hour.shape("Hour")
    for hand in S, Min,Hour:
        hand.shapesize(1,1,3)     # 调整指针的粗细
        hand.speed(0)
    printer = Turtle()
    printer.hideturtle()
    printer.penup()

期末课程设计,啥都不明白,自己改还该不对(っ╥╯﹏╰╥c)

  • 写回答

1条回答 默认 最新

  • chuifengde 2021-12-23 11:51
    关注

    你这个代码,网上不是有吗?一模一样的时钟代码

    评论

报告相同问题?

问题事件

  • 创建了问题 12月23日