Commit 30205089 by BellCodeEditor

save project

parent 5c28da29
Showing with 8 additions and 2 deletions
...@@ -11,4 +11,10 @@ def new_input(): ...@@ -11,4 +11,10 @@ def new_input():
print('请*输*入*数*字*!') print('请*输*入*数*字*!')
return total return total
a = new_input() a = new_input()
print(a) def sum(a):
\ No newline at end of file c = 0
for i in a:
c += i
return c
d = sum(a)
print('您一共消费'+str(d)+'元!扫码还是现金呢?')
\ 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