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
8d55a7c0
authored
Apr 12, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
f7a1629d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
diy1.py
diy1.py
View file @
8d55a7c0
# 这是悟空为花果山小猴做臂力测试的程序代码
a
=
{
'老八味'
:
5
,
'乔治味'
:
3
,
'原汁原味'
:
2
,
'九转大肠味'
:
8
}
b
=
input
(
"你想要什么口味的佩奇呀?"
)
if
b
in
a
:
print
(
"需要付"
,
str
(
a
[
b
]),
"元钱"
)
# from time import *
# a = {'老八味':5,'乔治味':3,'原汁原味':2,'九转大肠味':8}
# b = input("你想要什么口味的佩奇呀?")
# if b in a:
# print("需要付",str(a[b]),"元钱")
# sleep(2)
# print("没钱就滚开,穷逼")
# else:
# print("没有此商品")
name
=
{
'小美'
:
99
}
a
=
input
()
b
=
int
(
input
())
if
a
in
name
:
if
b
>
name
[
a
]:
name
[
a
]
=
b
else
:
print
(
"没有此商品"
)
\ No newline at end of file
name
[
a
]
=
b
print
(
name
)
\ 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