Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson1_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
a173b9d7
authored
Mar 28, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
cf7f6774
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
hello.py
hello.py
View file @
a173b9d7
for
i
in
range
(
10
):
import
random
print
(
"悟空"
)
i
=
input
(
"请你输入:"
)
\ No newline at end of file
fi
=
[
"剪刀"
,
"石头"
,
"布"
]
ad
=
random
.
choice
(
fi
)
print
(
"电脑出"
+
ad
)
if
i
in
fi
:
if
i
==
ad
:
print
(
"平局"
)
elif
(
i
==
"剪刀"
and
ad
==
"石头"
)
or
(
i
==
"石头"
and
ad
==
"布"
)
or
(
i
==
"布"
and
ad
==
"剪刀"
):
print
(
"电脑赢了"
)
else
:
print
(
"你赢了"
)
else
:
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