Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_1
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
f4b6c26b
authored
Sep 07, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a9ba66e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13924 additions
and
5 deletions
diy1.py
diy1.py
View file @
f4b6c26b
Changes suppressed. Click to show.
username
=
"python"
# 保存在服务器数据库中的用户账号(正确的账号)
userpassword
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
s
=
{
'可乐'
:
3333333333333333.5
,
'不了薯片'
:
12345678901234567890
,
'小龙辣条'
:
314159262017184393392329313537823488346812382580127093258723515809124734684290750724973250964378937046754
,
'屎味巧克力'
:
89718123892367498732653289546737985868324656098437859064778243
,
'又小又大蛋糕'
:
123456789009876543211234567890098765432112345678900987654321
,
'农夫山贼'
:
1234567890876543383832856478346553843922837253473821923483534782190938233457463478291901324847564378281934576574383292438574389485754839485748339249857658490495856768654930345958676584958656756890
}
k
=
input
(
'你想要啥'
)
s
=
0
while
True
:
if
k
==
'q'
:
break
else
:
if
k
in
s
:
s
+=
s
[
k
]
print
(
'你要的'
+
k
+
'花费'
+
str
(
s
[
k
])
+
'元'
)
else
:
print
(
'缺货了'
)
print
(
'共'
+
str
(
s
)
+
'元'
)
“?‘”?
# 请用input()实现用户输入账号、密码的功能
# 如果用户输入的账号、密码正确,提示登陆成功
\ 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