Commit 414533b8 by BellCodeEditor

save project

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