Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_2
This project
Loading...
Sign in
Toggle navigation
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
d127e3fe
authored
Sep 05, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
feddaa1c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
167 additions
and
0 deletions
__pycache__/func.cpython-37.pyc
func.py
xws.py
__pycache__/func.cpython-37.pyc
View file @
d127e3fe
No preview for this file type
func.py
View file @
d127e3fe
...
...
@@ -20,4 +20,165 @@ def imk():
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
print
(
s
)
def
sdm
(
a
):
inm
=
0
for
e
in
a
:
inm
=
inm
+
e
return
inm
def
imk
():
total
=
[]
while
True
:
try
:
unit
=
int
(
input
(
"请输入:"
))
except
:
print
(
'您输入错误。'
)
else
:
if
unit
==
int
(
'-1'
):
break
else
:
total
.
append
(
unit
)
return
total
re
=
imk
()
s
=
sdm
(
re
)
#print(s)
xws.py
View file @
d127e3fe
import
func
list
=
func
.
imk
()
add
=
func
.
sdm
(
list
)
list
=
int
(
input
(
'请输入分数:'
))
print
(
'这位选手的总分是:'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment