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
7a6132aa
authored
Nov 19, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
89d3ca46
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
diy1.py
diy1.py
View file @
7a6132aa
import
random
username
=
"python"
print
(
"你输定了"
)
userpassword
=
"1234567890"
print
(
"为什么"
)
a
=
input
(
"账号"
)
print
(
"没有为什么"
)
b
=
input
(
"密码"
)
while
True
:
if
a
==
username
and
b
=
username
wj
=
input
(
"你出什么?(石头/剪刀/布)"
)
print
(
"登陆成功"
)
print
(
"玩家出"
+
wj
)
\ No newline at end of file
list
=
[
"石头"
,
"剪刀"
,
"布"
,]
s
=
random
.
choice
(
list
)
print
(
"人机出,"
+
s
)
if
wj
==
s
:
print
(
"平局"
)
elif
(
wj
==
"石头"
and
s
==
"剪刀"
)
or
(
wj
==
"布"
and
s
==
"石头"
)
or
(
wj
==
"剪刀"
and
s
==
"布"
)
:
print
(
"你赢了"
)
else
(
wj
==
"石头"
and
s
==
"布"
)
or
(
wj
==
"布"
and
s
==
"剪刀"
)
or
(
wj
==
"剪刀"
and
s
==
"石头"
):
print
(
"你输了"
)
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