Commit 641d8dc6 by BellCodeEditor

auto save

parent 024fb164
import turtle
turtle.speed(0)
turtle.forward(100)
turtle.right(90)
turtle.forward(100)
turtle.done()
\ 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
total = [] def new_input():
while True: total = []
unit= input("请输入:") while True:
if unit== 'q': money= input("输入q退出")
break if money== 'q':
else: break
total.append(unit) else:
print(total) try:
\ No newline at end of file money=int(money)
except:
print('请重输入一个数字')
finally:
total.append(money)
print('*'*30)
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
# price=new_input()
# pay=sum(price)
# 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