Commit 2cf01e1f by BellCodeEditor

auto save

parent fd7e0414
Showing with 9 additions and 30 deletions
import turtle
turtle.pendown()
turtle.pencolor("pink")
turtle.left(105)
turtle.circle(90,70)
def totl():
total = []
while True:
unit= input("请输入价格:")
if unit== 'q':
break
else:
try:
unit=int(unit)
except:
print("你输入的不是整数")
else:
total.append(unit)
return total
def sum(qw):
ars=0
for i in qw:
ars=ars+i
return ars
totpl=totl()
a=sum(totpl)
print(a)
\ No newline at end of file
a=10
b=10
a==b
\ 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