1.Python诞生
1991 年 由吉多·范罗苏姆创造,早于Java,近年因大数据、 人工智能应用而兴起
2.Python数据类型
str:字符串
int :整数
float:小数(浮点数)
complex:复数
list:列表
tuple:元组
dict:字典
set:集合
bool:布尔值(True/False)
3.turtle绘画
penup()#抬笔
goto(0, -200)#移动到指定像素位置
pendown()#落笔
color('black')#颜色
pensize(8)#笔粗细
circle(300)#画直半径为"300"的圆
forward(x) #向前移动x单位
backward(x)#向后移动x单位
right(x)#逆时针旋转画笔方向X度
left(x)# 顺时针旋转画笔方向x度
4.荒坂社标(伪)
import turtle as t
t.pencolor('black')
t.pensize(10)
t.penup()
t.goto(0,50)
t.pendown()
t.circle(-100)
t.fillcolor('black')
t.begin_fill()
t.penup()
t.goto(0,38)
t.pendown()
t.pensize(5)
t.circle(-28)
t.end_fill()
t.fillcolor('black')
t.begin_fill()
t.penup()
t.goto(-56,0)
t.pendown()
t.circle(-28)
t.end_fill()
t.fillcolor('black')
t.begin_fill()
t.penup()
t.goto(56,0)
t.pendown()
t.circle(-28)
t.end_fill()
t.penup()
t.goto(0,-18)
t.pendown()
t.pensize(18)
t.goto(0,-130)
t.penup()
t.goto(56,-35)
t.pendown()
t.goto(0,-90)
t.penup()
t.goto(-56,-35)
t.pendown()
t.goto(0,-90)
t.penup()
t.goto(0,-250)
t.pendown()
style = ('Cyberpunk', 50, 'bold')
t.write('CYBERPUNK', font=style, align='center')
t.hideturtle()
t.done()