Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_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
5b3d5906
authored
Aug 13, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1203a358
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
dvojfdi.py
dvojfdi.py
View file @
5b3d5906
s
tonenumber
=
0
s
cores
=
{
'语文'
:
89
,
'英语'
:
95
,
'数学'
:
80
}
if
stonenumber
>=
4
:
def
get_average
(
scores
):
print
(
'可以打灭霸了'
)
sum_score
=
0
elif
1
<=
stonenumber
<=
3
:
for
subject
,
score
in
scores
.
items
():
print
(
'全军出击!'
)
sum_score
+=
score
else
:
print
(
'现在的总分是
%
d'
%
sum_score
)
print
(
'没办法了'
)
ave_score
=
sum_score
/
len
(
scores
)
\ No newline at end of file
print
(
'现在的平均分是
%
d'
%
ave_score
)
get_average
(
scores
)
\ 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