Commit 8d394823 by BellCodeEditor

save project

parent 3fad65ae
Showing with 40 additions and 3 deletions
import turtle
turtle.forward(100)
turtle.pensize(6)
turtle.pencolor("blue")
turtle.fillcolor("red")
turtle.begin_fill()
turtle.circle(75,180)
turtle.end_fill()
turtle.penup()
turtle.goto(150,-100)
turtle.pendown()
for i in range(5):
turtle.forward(100)
turtle.right(144)
turtle.hideturtle()
turtle.done()
\ No newline at end of file
a=int(input("请输入一个五位数"))
w=a//10000
q=a//1000%10
b=a//100%10
s=a//10%10
g=a%10
print("万:",w,"千:",q,"百:",b,"十:",s,"个:",g)
\ No newline at end of file
q=int(input("请输出带的钱"))
b=int(input("请输出本子的单价"))
m=int(input("请输出买了多少本"))
if q<b*m:
print("False")
else :
print("True")
\ No newline at end of file
......@@ -7,6 +7,10 @@ file1.write("张伟:16本\n")
file1.close()
with open(r"C:\Users\EDY\Desktop\1.txt","a",encoding="utf-8") as a:
a.write('bell:10本')
i_new=""
with open(r"C:\Users\EDY\Desktop\1.txt","r",encoding="utf-8") as a:
b=a.read()
print(b)
\ No newline at end of file
for i in a:
if "小丽:11本"in i:
i=i.replace("小丽:11本","小丽:10本")
i_new+=i
print(i_new)
\ 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