Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson8-5
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
76a2e177
authored
Jul 22, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
6a980f48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
GH.py
diy.py
GH.py
0 → 100644
View file @
76a2e177
cost
=
{
'小果'
:
52
,
'小竹'
:
19
,
'小布'
:
24
,
'小贝'
:
15
,
'小狗'
:
93
,
'小圆'
:
82
,
'萨哈比'
:
77
,
'小李子'
:
8
}
k
=
input
(
'请输入名称:'
)
v
=
input
(
'请输入分数:'
)
if
k
in
cost
:
if
int
(
v
)
>
cost
[
k
]:
print
(
k
+
'涨分数了,现在'
+
v
+
'分'
)
else
:
print
(
k
+
'你脑子缺氧了,我们不说'
)
else
:
cost
[
k
]
=
float
(
v
)
print
(
k
+
'的'
+
v
+
'分数已上传~'
)
\ No newline at end of file
diy.py
View file @
76a2e177
...
@@ -3,12 +3,11 @@
...
@@ -3,12 +3,11 @@
cost
=
{
'苹果'
:
5.2
,
'山竹'
:
12.9
,
'香蕉'
:
2.4
,
'荔枝'
:
15
,
'葡萄'
:
9.3
,
'桂圆'
:
8
,
'蓝莓'
:
10
,
'李子'
:
8
}
cost
=
{
'苹果'
:
5.2
,
'山竹'
:
12.9
,
'香蕉'
:
2.4
,
'荔枝'
:
15
,
'葡萄'
:
9.3
,
'桂圆'
:
8
,
'蓝莓'
:
10
,
'李子'
:
8
}
k
=
input
(
'请输入水果名称:'
)
k
=
input
(
'请输入水果名称:'
)
v
=
input
(
'请输入水果价钱:'
)
v
=
input
(
'请输入水果价钱:'
)
#
?补充条件判断:
#
if
# ?:
if
# ?:
# ?更新价钱
# ?更新价钱
DFSFDFDS
print
(
k
+
'降价了,现价'
+
v
+
'元'
)
print
(
k
+
'降价了,现价'
+
v
+
'元'
)
else
:
else
:
print
(
k
+
'涨价了,我们不买'
)
print
(
k
+
'涨价了,我们不买'
)
else
:
else
:
FSDDDDDDDDD
cost
[
k
]
=
float
(
v
)
print
(
k
+
'的价钱'
+
v
+
'元已上传~'
)
print
(
k
+
'的价钱'
+
v
+
'元已上传~'
)
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