Commit 4ca236ed by BellCodeEditor

auto save

parent 024fb164
Showing with 68 additions and 9 deletions
f=open(r"C:\Users\Administrator\Desktop\test.txt","a",encoding="utf-8"f.write("xiao lan :12B")
\ No newline at end of file
import turtle
f=turtle.Pen()
f.pensize(5)
f.pencolor("red")
f.penup()
f.goto(-100,-80)
f.pendown()
f.fd(200)
f.penup()
f.goto(-40,-80)
f.pendown()
f.rt(90)
f.fd(40)
f.penup()
f.goto(40,-80)
f.pendown()
f.fd(40)
f.rt(90)
f.fd(80)
f.penup()
f.goto(100,-80)
f.rt(90)
f.pendown()
f.fd(80)
f.rt(135)
f.fd(80)
f.rt(45)
f.fd(80)
f.rt(135)
f.fd(80)
f.lt(-45)
f.fd(200)
f.lt(30)
f.fd(200)
f.lt(120)
f.fd(200)
f.lt(30)
f.fd(200)
turtle.done()
\ No newline at end of file
total = [] def rz():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': unit= input("请输入:")
break if unit== 'q':
else: break
total.append(unit) else:
print(total) try:
\ No newline at end of file unit=int(unit)
except:
print("数字!!!!!!!!!!!!!!!!!!!!!!!!!!!")
else:
total.append(unit)
finally:
print("-"*30)
return total
def a(m):
c=0
for i in m:
c=c+i
return c
h=rz()
g=a(m)
print(str(g))
\ 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