Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-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
ad6c1df4
authored
Mar 16, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
debda1ad
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletions
erghse.py
rthd.py
erghse.py
View file @
ad6c1df4
a
=
{
"农夫山泉"
:
2
,
"旺仔牛奶"
:
4
,
"乐事薯片"
:
6
,
"巴西烤肉"
:
10
}
a
=
{
"农夫山泉"
:
2
,
"旺仔牛奶"
:
4
,
"乐事薯片"
:
6
,
"巴西烤肉"
:
10
,
}
b
=
input
(
"叮咚~你想要什么?"
)
b
=
input
(
"叮咚~你想要什么?"
)
if
b
in
a
:
if
b
in
a
:
print
(
"你买的"
+
a
+
"是"
+
str
(
a
[
b
])
+
"元"
)
print
(
"你买的"
+
a
+
"是"
+
str
(
a
[
b
])
+
"元"
)
...
...
rthd.py
0 → 100644
View file @
ad6c1df4
score
=
{
"刘文浩"
:
90
,
"同浩泽"
:
90
,
"马雨泽"
:
99
}
a
=
input
(
"输入姓名:"
)
b
=
input
(
"输入成绩:"
)
if
a
in
score
:
if
int
(
b
)
>
score
[
a
]:
score
[
a
]
=
int
(
b
)
print
(
"已更新"
)
else
:
print
(
"你的成绩比以前低,未更新"
)
else
:
score
[
a
]
=
int
(
b
)
print
(
"这是你的第一次成绩"
)
\ 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