Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson11_4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 006e394a authored 2 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 3249ef80
Hide whitespace changes
Inline Side-by-side
Showing with 30 additions and 4 deletions
  • 66.py
  • __pycache__/func.cpython-37.pyc
  • func.py
  • swim.py
66.py 0 → 100644
View file @ 006e394a
# file1=open(r"C:\Users\Administrator\Desktop\test.txt","w",encoding='utf-8')
# file1.write('小兰:12本')
# file1.close()
# file1=open(r"C:\Users\Administrator\Desktop\test.txt","w",encoding='utf-8')
# file1.write('老马:12本\n')
# file1.write('小强:10本\n')
# file1.close()
# file1=open(r"C:\Users\Administrator\Desktop\test.txt","a",encoding='utf-8')
# file1.write('小兰:12本')
# file1.close()
with open(r"C:\Users\Administrator\Desktop\test.txt","a",encoding='utf-8') as
file:
file.write('小兰:12本')
\ No newline at end of file
This diff is collapsed. Click to expand it.
__pycache__/func.cpython-37.pyc 0 → 100644
View file @ 006e394a
File added
This diff is collapsed. Click to expand it.
func.py
View file @ 006e394a
def daima():
def new_input():
total = []
while True:
unit=input("请输入:")
......@@ -13,5 +13,12 @@ def daima():
total.append(unit)
finally:
print('-'*30)
print(total)
daima()
\ No newline at end of file
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
# price=new_input()
# pay=sum(price)
# print('您消费'+str(pay)+'元,扫码还是现金')
\ No newline at end of file
This diff is collapsed. Click to expand it.
swim.py 0 → 100644
View file @ 006e394a
import func
data=func.new_input()
score=func.sum(data)
print('总分为'+str(score)+'分')
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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