Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-3
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
c048e0bb
authored
Mar 16, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ada42cb7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
1.py
1.py
View file @
c048e0bb
dict
=
{
'马雨泽'
:
0.1
,
'同浩泽'
:
0.2
,
'魏子轩'
:
0.01
,
'依依老师'
:
1000
}
a
=
input
(
"你要什么?"
)
dict
=
{
'马雨泽'
:
1
,
'同浩泽'
:
60
,
'魏子轩'
:
0.1
,
'依依老师'
:
1000
,
'刘文浩'
:
100
}
a
=
input
(
"你叫什么?"
)
b
=
input
(
"你考了多少?"
)
if
a
in
dict
:
print
(
"你买的"
+
a
+
"是"
+
str
(
dict
[
a
])
+
"元"
)
if
int
(
b
)
>
dict
[
a
]:
dict
[
a
]
=
int
(
b
)
print
(
"已更新"
)
else
:
print
(
"不更新"
)
else
:
print
(
"已经死了"
)
dict
[
a
]
=
int
(
b
)
print
(
"已添加"
)
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