Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-5_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
99cef82c
authored
Dec 16, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
58f8ac63
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
2.py
jk.py
2.py
0 → 100644
View file @
99cef82c
jk.py
View file @
99cef82c
import
random
username
=
"鸡你太美"
player
=
input
(
"请输入石头剪刀布:"
)
userpassword
=
"1371"
print
(
"玩家出"
+
player
)
while
True
:
list
=
[
"石头"
,
"剪刀"
,
"布"
]
name
=
input
(
"请输入用户名:"
)
computer
=
random
.
choice
(
list
)
password
=
input
(
"请输入密码:"
)
print
(
"电脑出"
+
computer
)
if
name
==
username
and
password
==
userpassword
:
if
player
in
list
:
print
(
"登陆成功"
)
if
player
==
computer
:
break
print
(
"平局"
)
if
name
!=
username
:
elif
(
player
==
"石头"
and
computer
==
"剪刀"
)
or
(
player
==
"布"
and
computer
==
"石头"
)
or
(
player
==
"剪刀"
and
computer
==
"布"
):
print
(
"用户名错误"
)
print
(
"你赢了"
)
if
password
!=
userpassword
:
else
:
print
(
"密码错误"
)
print
(
"你输了"
)
print
(
"欢迎来到贝尔编程!"
)
else
:
\ No newline at end of file
print
(
"输入错误"
)
\ 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