# 学习啥是python
import turtle # 叫做乌龟的一个画画工具包
# 变量:
# 法无禁止即自由
# turtle.color('blue')
# 数据存储类型
# 数字 + - * / // 取不大于结果de最大整数 % 余数 **
# 字符串 ' ' " "
# 列表 [ ]
# 字典 {}
# 元组 () 不能修改
# 布尔表达式 True Fasle
# 判断 if - elif - else
# 循环 for while
# 函数 def ---》 太极图 哆啦a梦
# 接小球游戏 动画 判断输赢 文字 图片 背景音乐
# 文件操作
# 时间 穿越时间 1。做梦 2.穿越时间:1天
# 对象 class
a = "阿坤"
b = "阿菜"
c = ["菜徐坤", "pgone", "乔币落", a, b] # 计算机0
cai = {"姓名": "阿坤", "技能": "篮球"}
cai_skill = ("rap", "sing")
c[1] = "pgtwo"
print(1<0)
if 1>0:
print("lallalala")
elif 2>0:
print("daaddaad")
else:
print("kakakakkak")
# speed 速度
turtle.speed(0)
# for i in range(1000):
# turtle.fd(i)
# turtle.left(123)
# turtle.done()
# turtle.speed(0)
# a = 0
# while a<1000 :
# a+=1
# turtle.fd(i)
# turtle.left(123)
# turtle.done()
def star(length):
for i in range(5):
turtle.fd(length)
turtle.left(144)
star(220)
turtle.done()
Nancy - python知识回顾
最新推荐文章于 2024-06-25 17:02:33 发布