Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson11_4
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
bccd2236
authored
Jun 09, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
b17e1fb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
.vscode/settings.json
func.py
.vscode/settings.json
0 → 100644
View file @
bccd2236
{
"python.testing.pytestArgs"
:
[
"."
],
"python.testing.unittestEnabled"
:
false
,
"python.testing.nosetestsEnabled"
:
false
,
"python.testing.pytestEnabled"
:
true
}
\ No newline at end of file
func.py
View file @
bccd2236
...
...
@@ -4,11 +4,15 @@ def x ():
unit
=
input
(
"请输入:"
)
try
:
unit
=
int
(
unit
)
except
expression
as
identifier
:
print
(
"请输入整数"
)
except
:
if
unit
==
'q'
:
break
print
(
"请输入整数"
)
else
:
total
.
append
(
unit
)
print
(
total
)
x
()
\ No newline at end of file
return
total
def
sum
(
y
):
count
=
0
for
i
in
sum
:
count
=
count
+
i
return
count
\ No newline at end of file
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