Lv.1
我叫张政卿,请多多包涵
签名:我在 学python,正在做图表。
在 【海龟APP·版本更新】Codemao库上线,测测你的外貌能藏得住年龄吗? 中回复
我这边安装了codemao库,却既没有积木,输入import codemao也没有反应,还显示无法导入codemao库?
2019-07-10T21:51:28 点赞:0
在 【Python作品分享】太极【作品秀】 中回复
import turtle
def yin(radius, color1, color2): t.width(3) t.color("black", color1) t.begin_fill() t.circle(radius/2, 180) t.circle(radius, 180) t.left(180) t.circle(-radius/2, 180) t.end_fill()
t.left(90) t.up() t.fd(radius * 0.35) t.right(90) t.down() t.color(color1, color2) t.begin_fill() t.circle(radius * 0.15) t.end_fill() t.left(90) t.up() t.bk(radius * 0.35) t.down() t.left(90)
def main(): t.reset() yin(200, 'black', 'white') yin(200, 'white', 'black')
if __name__ == "__main__": t = turtle.Turtle() main() turtle.mainloop()
2019-07-28T19:10:18 点赞:0
在 【Python作品分享】太极【作品秀】 中回复
import turtle
def yin(radius, color1, color2):
t.width(3)
t.color("black", color1)
t.begin_fill()
t.circle(radius/2, 180)
t.circle(radius, 180)
t.left(180)
t.circle(-radius/2, 180)
t.end_fill()
t.left(90)
t.up()
t.fd(radius * 0.35)
t.right(90)
t.down()
t.color(color1, color2)
t.begin_fill()
t.circle(radius * 0.15)
t.end_fill()
t.left(90)
t.up()
t.bk(radius * 0.35)
t.down()
t.left(90)
def main():
t.reset()
yin(200, 'black', 'white')
yin(200, 'white', 'black')
if __name__ == "__main__":
t = turtle.Turtle()
main()
turtle.mainloop()2019-07-28T19:11:45 点赞:0
在 【Python作品分享】小星星亮晶晶_测试【作业帖】 中回复
import random import turtle as t
t.pensize(0) n=100 #此处是星星的数量 Colors = ['red', 'yellow', 'blue', 'green','orange', 'purple', 'white', 'gray','skyblue']
for i in range(n): v = random.randint(10, 40) x = random.randint((-300), 300) y = random.randint((-300), 300) q = random.choice(Colors) t.bgcolor("black") t.speed(0) t.pencolor(q) for j inrange(v): t.forward(j) t.right(144) t.penup() t.goto(x, y) t.pendown() t.mainloop()
2019-08-03T12:16:12 点赞:0
在 【Python作品分享】小星星亮晶晶_测试【作业帖】 中回复
import random
import turtle as t
t.pensize(0)
n=100 #此处是星星的数量
Colors = ['red', 'yellow', 'blue', 'green','orange', 'purple', 'white', 'gray','skyblue']
for i in range(n):
v = random.randint(10, 40)
x = random.randint((-300), 300)
y = random.randint((-300), 300)
q = random.choice(Colors)
t.bgcolor("black")
t.speed(0)
t.pencolor(q)
for j in range(v):
t.forward(j)
t.right(144)
t.penup()
t.goto(x, y)
t.pendown()
t.mainloop()
2019-08-03T12:16:28 点赞:0