Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-1-1_DIY1
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
e425f82d
authored
Sep 16, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ec54421f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
diy.py
diy3.py
diy.py
View file @
e425f82d
palayer
=
input
(
"请出拳(石头,剪刀,布)"
)
print
(
"玩家出拳:"
+
palayer
)
\ No newline at end of file
# dic={'语文':95.5,'数学':99.5,'英语':98}
# a=dic['语文']
# print(a)
# dic['数学']=100
# print(dic)
# dic['物理']=150
# print(dic)
# if'物理'in dic:
# print(dic['物理'])
dict
=
{
'可口可乐'
:
100
,
'雪碧'
:
50
,
'辣条'
:
0.00001
,
'芬达'
:
0.81
}
while
True
:
k
=
input
(
"请输入需要的物品名:"
)
if
k
in
dict
:
print
(
"你想要的"
+
k
+
'需要支付'
+
str
(
dict
[
k
])
+
"元!"
)
print
(
"-"
*
30
)
else
:
print
(
"没有货"
)
print
(
'-'
*
30
)
diy3.py
0 → 100644
View file @
e425f82d
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