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 2eaf9807 authored 10 months ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 8957f091
Hide whitespace changes
Inline Side-by-side
Showing with 23 additions and 9 deletions
  • func.py
func.py
View file @ 2eaf9807
total = []
while True:
unit= input("请输入:")
if unit== 'q':
break
else:
total.append(unit)
print(total)
\ No newline at end of file
def who():
total = []
while True:
unit= input("请输入:")
try:
unit=int(unit)
except:
if unit== 'q':
break
else:
total.append(unit)
return total
list1=who()
print(list1)
def can(shu):
see=0
for i in shu:
see=see+i
return see
list2=can(list1)
print(list2)
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