Commit 414533b8 by BellCodeEditor

save project

parent 8c0774c9
Showing with 16 additions and 20 deletions
import turtle file=open(r'c:\Users\admin\Desktop\test.txt','w',encoding=('utf-8')
screen=turtle.Screen() file.write('小兰 12本\n')
screen.bgcolor("pink") file.write('小丽 11\n')
file.write('李文 9本\n')
pen1=turtle.Pen() file.write('张伟 16本\n')
pen1.up() with open(r'c:\Users\admin\Desktop\test.txt','a',encoding='utf-8')as file:
pen1.goto(100,-100) file.write('李强16本\n')
pen1.write('Hi\nSB',font=("MV Boli",30,"normal")) file.write('李三 16本\n')
file=open(r'c:\Users\admin\Desktop\test.txt','r',encoding=('utf-8')as file:
pen=turtle.Pen() a=file.read()
pen.pencolor("red") print(a)
pen.pensize(1) file=open(r'c:\Users\admin\Desktop\test.txt','r',encoding=('utf-8')as file:
pen.left(45) for i in file:
pen.forward(100) if"小丽 11本" in i:
pen.circle(50,180) print('数据存在')
pen.right(90) \ No newline at end of file
pen.circle(50,180)
pen.forward(100)
turtle.done()
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