Commit eeb6b25a by BellCodeEditor

save project

parent 67ea7b61
Showing with 15 additions and 31 deletions
def a(): import turtle
total = [] a=turtle.Pen()
while True: a.pensize(10)
unit=input("请输入:") a.penup()
if unit== 'q': a.goto(-50,100)
break a.pendown()
else: a.pencolor("red")
try: a.right(90)
unit=int(unit) a.fd(200)
except: a.left(90)
print("请输入数字:") a.pencolor("blue")
else: a.circle(100,180)
total.append(unit) a.hideturtle()
finally: turtle.done()
print("-"*30) \ No newline at end of file
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
# price=a()
# pay=sum(price)
#print("您一共消费了"+str(pay)+"元")
import func
d=func.a()
s=func.sum(d)
print("这位选手的总分数为:"+str(s))
\ 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