Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson1_5
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
f700d8e5
authored
Jul 13, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
d3ebd26f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
12481518.py
lao
star.py
12481518.py
View file @
f700d8e5
name
=
input
(
"士大夫士大夫胜多负少"
)
player
=
input
(
"出 石头、剪刀、布"
)
print
(
name
+
"man"
)
print
(
"出:"
+
player
)
#ji
import
random
list
=
[
"石头"
,
"剪刀"
,
"布"
]
computer
=
random
.
choice
(
list
print
(
"随机出拳"
+
computer
)
#3
if
player
==
"石头"
and
computer
==
"剪刀"
or
player
==
"剪刀"
and
computer
==
"布"
and
computer
==
"石头"
:
print
(
"过!"
)
elif
player
==
computer
:
print
(
"艹"
)
else
:
print
(
"哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈"
)
lao
View file @
f700d8e5
name=imput("dsffsdghsfg")
print("name+"man")
\ No newline at end of file
star.py
View file @
f700d8e5
# 答案
# 答案
import
turtle
player
=
input
(
"出 石头、剪刀、布"
)
cffdyg
=
input
(
"要啥色"
)
print
(
"出:"
+
player
)
pen
=
turtle
.
Pen
()
#ji
pen
.
fillcolor
(
cffdyg
)
import
random
pen
.
begin_fill
()
list
=
[
"石头"
,
"剪刀"
,
"布"
]
for
i
in
range
(
5
):
#重复执行5次
computer
=
random
.
choice
(
list
)
pen
.
forward
(
200
)
#向前移动200步
print
(
"随机出拳"
+
computer
)
pen
.
right
(
144
)
#向右移动144度,注意这里的参数一定不能变
#3
pen
.
end_fill
()
#结束填充红色
if
player
==
"石头"
and
computer
==
"剪刀"
or
player
==
"剪刀"
and
computer
==
"石头"
or
computer
==
"布"
:
turtle
.
done
()
print
(
"你过关!"
)
\ No newline at end of file
elif
player
==
computer
:
print
(
"艹"
)
else
:
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