Commit 1762eead by BellCodeEditor

save project

parent 1606647c
Showing with 8 additions and 12 deletions
a = []
while True:
b = input('输入:')
if b=='q':
break
else:
a.append(b)
print(a)
\ No newline at end of file
......@@ -12,5 +12,11 @@ def abg():
else:
total.append(unit)
return total
def aq(a):
ab = 0
for i in a:
ab = ab+i
return ab
a = abg()
print(a)
\ No newline at end of file
sb = aq(a)
print('要',sb,'元。')
\ 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