Commit ac8214d7 by BellCodeEditor

save project

parent e532136e
Showing with 15 additions and 8 deletions
# 利用write()帮助悟空给诺依回信吧~
import turtle import turtle
pen=turtle.Pen() pen=turtle.Pen()
pen.write("你好,\n诺依.",font=("Times",35,"normal"))
abc=1
for i in range(300):
pen.forword(abc)
abc+=1
pen.right(91)
pen.hideturtle() pen.hideturtle()
turtle.done() trutle.down()
\ No newline at end of file \ No newline at end of file
for i in range(1,10): file=open(r"C:\Users\paulb\Desktop\test.txt",'w',encoding='utf-8')
for j in range(1,i+1): file.write('小明:20\n小红:11\n小李:15\n')
print(j,"*",i,"=",j*i) file.close()
print() file=open(r"C:\Users\paulb\Desktop\test.txt",'a',encoding='utf-8')
file.write('小强:12\n小张:18\n小二:13\n')
file.close()
\ 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