Commit f1b7e7ac by BellCodeEditor

auto save

parent 641d8dc6
import turtle import func
turtle.speed(0)
turtle.forward(100) # 调用自定义的输入函数,实现分数输入的功能
turtle.right(90) data = func.new_input()
turtle.forward(100) # 调用自定义的求和函数,计算需要支付的总价
turtle.done() score = func.sum(data)
print("这位选手的总分数为:"+str(score))
\ No newline at end of file
import turtle
turtle.penup()
turtle.goto(0,-50)
turtle.pendown()
turtle.circle(50)
turtle.penup()
turtle.goto(-50,0)
turtle.down()
turtle.forward(100)
turtle.penup()
turtle.goto(0,50)
turtle.right(90)
turtle.down()
turtle.forward(100)
turtle.hideturtle()
turtle.done()
\ No newline at end of file
...@@ -18,6 +18,6 @@ def sum(money): ...@@ -18,6 +18,6 @@ def sum(money):
for i in money: for i in money:
count=count+i count=count+i
return count return count
# price=new_input() price=new_input()
# pay=sum(price) pay=sum(price)
# print('您一共消费了'+ str(pay) +'元') print('您一共消费了'+ str(pay) +'元')
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