Commit ef937778 by BellCodeEditor

auto save

parent d044d7b9
Showing with 32 additions and 19 deletions
""" s1={"数学":100,"语文":100}
使用turtle模块画图 s2={"数学":109,"语文":123}
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果 s3={"数学":123,"语文":187}
""" sc={"小贝":s1,"小胡":s2,"小空":s3}
import turtle while True:
m=input("请输入姓名:")
if m=="stop":
break
if m in sc:
print(m+"同学,请查收你的成绩单:"+str(sc[m]))
print("*"*20)
else:
print("抱歉,你的成绩未收录其中")
print("*"*20)
pen = turtle.Pen()
screen = turtle.Screen() \ No newline at end of file
screen.bgcolor("light pink")
colors=["white","blue","violet","cyan"]
# 请创造师在下面接着创作
distance=1
pen.speed(1000)
for i in range(1,300):
pen.pencolor(colors[i%4])
pen.forward(i)
pen.right(91)
# 隐藏画笔,保存画布
pen.hideturtle()
turtle.done()
import random
list=["刘","王","贵"]
a=random.choice(list)
print("上台分享的是:"+a)
\ No newline at end of file
file=open(r"C:\Users\29018\Desktop\ddd.txt",'w',encoding='utf-8')
file.write("不")
file.close()
with open(r"C:\Users\29018\Desktop\ddd.txt",'r',encoding='utf-8') as file:
for i in file:
if "jin" in i:
file.replace("jin","发)
else:
print("bu")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment