Commit 91ac084d by BellCodeEditor

save project

parent dc70412a
Showing with 192 additions and 0 deletions
#yyy=0
#x =20
#n=input("请输入奶牛的数量")
#yyy=int(n)*20*7
#print(n+"头可以生产"+str(yyy)+"千克牛奶量")
''''
c=input("输入总秒数")
a=int(c)//3600
b=int(c)-a*3600
b=b//60
c=int(c)-a*3600-b*60
print(a,b,c)
'''
'''
a=6 #长方形肠为6
b=3 #长方形宽为3
s=a*b #长方形的面积为长*宽
print("长方形的面积为:"+str(s))
'''
'''
import turtle
a=turtle.Pen()
a.fillcolor("yellow")
a.pencolor("black")
a.begin_fill()
a.forward(180)
a.left(90)
a.forward(180)
a.goto(0,0)
a.end_fill()
a.fillcolor("red")
a.begin_fill()
a.forward(180)
a.left(-90)
a.forward(180)
a.end_fill()
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.circle(100)
a.left(90)
a.forward(200)
a.left(180)
a.forward(100)
a.left(90)
a.forward(100)
a.left(180)
a.forward(200)
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.penup()
a.goto(90,45)
a.pendown()
a.fillcolor("blue")
a.begin_fill()
a.circle(50)
a.end_fill()
turtle.done()
'''
'''
import turtle
a=turtle.Pen()
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
a.forward(180)
a.left(90)
turtle.done()
'''
'''
try:
age = int(input('你今年几岁了?'))
except:
print('要输入整数啊')
else:
if age < 18:
print('不可以喝酒奥')
print('程序结束~~')
'''
def new_input():
total = []
while True:
money = input('请输入(q退出):')
if money == 'q':
break
else:
try:
money = int(money)
except:
print("请重新输入一个数字")
else:
total.append(money)
finally:
print("-"*30)
return total
#result = new_input()
#print(result)
def uuu(money):
uuu=0
for i in money:
uuu = uuu+i
return uuu
price = new_input()
pay = uuu(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