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
56bfefd7
authored
Jan 29, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
4a164d39
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
18 deletions
jia
jia.py
加法运算.py
发过的.py
词汇.py
jia
View file @
56bfefd7
s=int(input("请输入一个五位数:"))
a=int((s-s%10000)/10000)
b=int(((s-(s%1000))-a*10000)/1000)
c=int(((s-(s%100))-a*10000-b*1000)/100)
d=int(((s%100)-(s%10))/10)
e=int(s%10)
print(e,d,c,b,a)
jia.py
0 → 100644
View file @
56bfefd7
a
=
int
(
input
(
"请输入一个五位数:"
))
b
=
int
((
a
-
a
%
10000
)
/
10000
)
c
=
int
(((
a
-
(
a
%
1000
))
-
b
*
10000
)
/
1000
)
d
=
int
(((
a
-
(
a
%
100
))
-
b
*
10000
-
c
*
1000
)
/
100
)
e
=
int
(((
a
%
100
)
-
(
a
%
10
))
/
10
)
f
=
int
(
a
%
10
)
print
(
f
,
e
,
d
,
c
,
b
)
\ No newline at end of file
加法运算.py
View file @
56bfefd7
A
=
int
(
input
(
"请输入学生人数:"
))
A
=
int
(
input
(
"请输入学生人数:"
))
A
=
int
(
input
(
"请输入学生人数:"
))
A
=
int
(
input
(
"请输入学生人数:"
))
B
=
int
(
input
(
"请依次输入学生成绩:"
))
B
=
0
print
(
"班级总成绩"
)
for
i
in
range
(
A
):
print
(
"平均成绩"
)
B
=
B
+
int
(
input
(
"学生成绩:"
))
\ No newline at end of file
print
(
"班级总成绩"
,
B
)
print
(
"平均成绩"
,
B
/
A
)
A
=
int
(
input
(
"请输入学生人数:"
))
B
=
[]
for
i
in
range
(
A
):
C
=
int
(
input
(
"学生人数"
+
str
(
i
+
1
)
+
"成绩"
))
B
.
append
(
C
)
print
(
B
)
D
=
0
for
i
in
B
:
D
=
D
+
i
print
(
D
)
E
=
D
/
A
print
(
E
)
\ No newline at end of file
发过的.py
0 → 100644
View file @
56bfefd7
++ "b/\345\217\221\350\277\207\347\232\204.py"
词汇.py
View file @
56bfefd7
dict
=
{
'小明'
:
89
,
'小王'
:
87
,
'小章'
:
90
,
'小亮'
:
98
,
'小华'
:
67
,
'小张'
:
100
}
weather
=
{
'天津'
:
89
,
'广州'
:
87
,
'山西'
:
90
,
'陕西'
:
98
,
'山东'
:
67
,
'四川'
:
100
}
dict
=
{
'小明'
:
89
,
'小王'
:
87
,
'小章'
:
90
,
'小亮'
:
98
,
'小华'
:
67
,
'小张'
:
100
}
weather
=
{
'天津'
:
89
,
'广州'
:
87
,
'山西'
:
90
,
'陕西'
:
98
,
'山东'
:
67
,
'四川'
:
100
}
a
=
input
(
"请输入你的姓名"
)
date
=
weather
.
pop
(
'天津'
)
b
=
input
(
"请输入你最新的成绩"
)
print
(
date
)
if
a
in
dict
:
print
(
weather
)
if
int
(
b
)
>
dict
[
a
]:
\ No newline at end of file
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