Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson15_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
f5b3f88b
authored
Mar 23, 2025
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
b428a128
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
0 deletions
11.py
课件/01.py
课件/02.py
课件/03.py
11.py
0 → 100644
View file @
f5b3f88b
username
=
"霍鼎文"
userpassword
=
"17988"
i
=
0
while
True
:
if
i
<=
3
name
=
input
(
"请输入用户名:"
)
password
=
input
(
"请输入密码:"
)
i
+=
1
if
username
==
name
and
password
==
userpassword
:
print
(
"登录成功!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
)
break
if
name
!=
username
:
print
(
"用户名错误"
)
continue
if
password
!=
userpassword
:
print
(
"用户密码错误"
)
elif
:
print
(
"去自首吧"
)
exit
()
print
(
"欢迎来到贝尔!"
)
课件/01.py
0 → 100644
View file @
f5b3f88b
print
(
"-----------------------------"
)
print
(
"-----------------------------"
)
print
(
"| |"
)
print
(
"|---------------------------|"
)
print
(
"|1.可乐 3元 | * * "
)
print
(
"|2.雪碧 3.5元 | ------"
)
print
(
"|3.糖果 0.5元 | | 投 |"
)
print
(
"|4.袜子 10元 | | 币 |"
)
print
(
"|5.奥特曼 100元 | | 口 |"
)
print
(
"|6.面包 5元 | ------"
)
print
(
"| |"
)
print
(
"|---------------------------|"
)
print
(
"| |"
)
print
(
"| 取货口 |"
)
print
(
"| +----------------+ |"
)
print
(
"| +----------------+ |"
)
print
(
"| +----------------+ |"
)
print
(
"| |"
)
print
(
"|---------------------------|"
)
qian
=
int
(
input
(
"请投入您的货币:"
))
bianhao
=
int
(
input
(
"请投入您需要购买的商品编号:"
))
shuliang
=
int
(
input
(
"请输入您需要购买的商品数量:"
))
if
bianhao
==
1
:
jiage
=
3
print
(
'购买可乐'
)
elif
bianhao
==
2
:
jiage
=
3.5
print
(
'购买雪碧'
)
elif
bianhao
==
3
:
jiage
=
0.5
print
(
'购买糖果'
)
elif
bianhao
==
4
:
jiage
=
10
print
(
'购买袜子'
)
elif
bianhao
==
5
:
jiage
=
100
print
(
'购买奥特曼'
)
elif
bianhao
==
6
:
jiage
=
5
print
(
'购买面包'
)
else
:
jiage
=
0
print
(
"请输入正确的价格"
)
if
qian
<
jiage
*
shuliang
:
print
(
'金额不足'
)
print
(
'返还'
,
qian
)
else
:
print
(
"购买 成功"
)
print
(
'返回'
,
qian
-
jiage
*
shuliang
)
课件/02.py
0 → 100644
View file @
f5b3f88b
++ "b/\350\257\276\344\273\266/02.py"
课件/03.py
0 → 100644
View file @
f5b3f88b
++ "b/\350\257\276\344\273\266/03.py"
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