Commit f3e31a91 by BellCodeEditor

save project

parent 60867e13
...@@ -18,6 +18,6 @@ def sum(unit): ...@@ -18,6 +18,6 @@ def sum(unit):
for i in unit: for i in unit:
count=count+fh count=count+fh
return count return count
price=new_input(): #price=new_input():
pay=sum(price) pay=sum(price)
print('您一共消费了'+str(pay)+'扫码还是支付') print('您一共消费了'+str(pay)+'扫码还是支付')
\ No newline at end of file
file1 = open(r'C:\Users\Administrator\Desktop\book.txt','w',encoding='GBK')
file1.write('小兰:12本')
file1.write('\n''小丽:11本')
file1.write('\n''李文:9本')
file1.write('\n''张伟:16本')
file1.close()
\ 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