Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson9_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
4fa4c3b6
authored
Jun 09, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
3fe84e0c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
11 deletions
a.py
diy2.py
f
y.py
a.py
0 → 100644
View file @
4fa4c3b6
while
True
c
=
input
(
"名字:"
)
\ No newline at end of file
diy2.py
View file @
4fa4c3b6
a
=
{
'语文:'
:
97
,
'数学:'
:
100
,
'英语:'
:
98
}
b
=
{
'语文:'
:
90
,
'数学:'
:
100
,
'英语:'
:
90
}
c
=
{
'你:'
:
a
,
'我:'
:
b
}
while
True
:
c
=
input
(
"名字:"
)
if
d
=
c
[
d
]
for
n
,
m
=
e
in
c
.
items
:
print
(
"——"
*
10
)
# 请对字典进行遍历,将保存的分数以键值对的形式提取打印出来
xinxi
=
{}
list
=
[]
while
True
:
print
(
"*"
*
35
)
chaxun
=
input
(
"请输入自己的需求:1.学生信息注册 2.查询学生信息 3.注销学生信息 4.查询班级总人数"
)
if
chaxun
==
"1"
:
xingming
=
input
(
"姓名:"
)
banji
=
input
(
"班级:"
)
nianling
=
input
(
"年龄:"
)
list
=
[
banji
,
nianling
]
xinxi
[
xingming
]
=
list
print
(
xinxi
)
print
(
"储存成功!"
)
if
chaxun
==
"2"
:
xingming
=
input
(
"姓名:"
)
if
xingming
in
xinxi
:
print
(
xingming
)
for
item
in
list
print
(
item
)
if
chaxun
==
"3"
:
xingming
=
input
(
"姓名:"
)
xinxi
.
pop
(
xingming
)
print
(
xinxi
)
print
(
"注销成功!"
)
if
chaxun
==
"4"
:
changdu
=
len
(
xinxi
)
print
(
changdu
)
\ No newline at end of file
f
0 → 100644
View file @
4fa4c3b6
y.py
0 → 100644
View file @
4fa4c3b6
a1
=
open
(
r'C:\Users\Administrator\Desktop\新建文件夹\aqq.txt'
,
'w'
,
encoding
=
'utf-8'
)
a1
.
write
(
'sb'
)
a1
.
close
()
\ 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