鳕鱼天空

This is Mr Wang's Tech Blog.

教孩子学编程(Python版)

MU 1.0.0

https://pan.baidu.com/s/1935q1m7nMj9QL4vS8j6eeQ

 

彩色的乌龟1

import turtle
colors = ["red", "yellow", "blue", "green"]
t=turtle.Pen()
for x in range(100):
    t.pencolor(colors[x%4])
    t.forward(x)
    t.left(92)

可控制的彩色乌龟:

import turtle
turtle.bgcolor("black")
colors = ["red", "yellow", "blue", "green", "pink", "purple", "orange"]
t = turtle.Pen()
siders = eval(input("Please enter a number of siders between 2 and 7:"))
if(siders > 7):
    siders = 7
if(siders < 2):
    siders = 2
for x in range(400):
    t.pencolor(colors[x % siders])
    t.forward(x*3/siders+x)
    t.left(360/siders+1)
    t.width(x*siders/200)

 

 

 

教孩子学编程(Python)PDF

Excel 日常记录

2018-09-05

记分册中的名单打印:

分辨率1440*900,学号4px,姓名8px,行高14px,字体9pt