Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-5_DIY1
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
f8226f36
authored
Jan 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
f414478f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
加法运算.py
词汇.py
加法运算.py
View file @
f8226f36
A
=
int
(
input
(
"请输入年份:"
))
A
=
int
(
input
(
"请输入学生人数:"
))
A
=
int
(
input
(
"请输入年份:"
))
if
A
%
4
==
0
:
print
(
"闰年"
)
else
:
print
(
"平年"
)
\ No newline at end of file
A
=
int
(
input
(
"请输入学生人数:"
))
B
=
int
(
input
(
"请依次输入学生成绩:"
))
print
(
"班级总成绩"
)
print
(
"平均成绩"
)
\ No newline at end of file
词汇.py
View file @
f8226f36
dict_hero
=
{
'赵一'
:
30
,
'王三'
:
40
,
'张三'
:
50
}
dict
=
{
'小明'
:
89
,
'小王'
:
87
,
'小章'
:
90
,
'小亮'
:
98
,
'小华'
:
67
,
'小张'
:
100
}
dict_hero
=
{
'赵一'
:
30
,
'王三'
:
40
,
'张三'
:
50
}
print
(
dict_hero
)
dict_hero
[
'唐三'
]
=
60
print
(
dict_hero
)
if
"赵一"
in
dict_hero
:
print
(
dict_hero
[
"赵一"
])
dict
=
{
'小明'
:
89
,
'小王'
:
87
,
'小章'
:
90
,
'小亮'
:
98
,
'小华'
:
67
,
'小张'
:
100
}
a
=
input
(
"请输入你的姓名"
)
b
=
input
(
"请输入你最新的成绩"
)
if
a
in
dict
:
if
int
(
b
)
>
dict
[
a
]:
dict
[
a
]
=
int
(
b
)
print
(
"请稍等"
+
a
+
"分数已上传"
+
b
+
"分"
)
else
:
print
(
"请稍等"
+
a
+
"成绩未超过上次"
)
else
:
dict
[
a
]
=
int
(
b
)
print
(
"请稍等"
+
a
+
"同学,你的第一次成绩已上传"
+
b
)
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