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
ca300a2e
authored
Aug 03, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
640dc4ca
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
m.py
star.py
m.py
View file @
ca300a2e
name
=
input
(
""
)
\ No newline at end of file
star.py
View file @
ca300a2e
import
turtle
pen
=
turtle
.
pen
()
pen
.
fill_color
(
"red"
)
pen
.
begin_fill
()
pen
.
speed
(
1000
)
for
i
in
range
(
5
):
pen
.
forward
(
144
)
pen
.
left
(
144
)
pen
.
end_fill
()
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
life1
=
2
life2
=
2
while
True
:
a
=
input
(
"请出拳:"
)
print
(
"玩家出拳:"
+
a
)
import
random
s
=
[
"剪刀"
,
"石头"
,
"布"
]
lll
=
random
.
choice
(
s
)
print
(
"电脑出拳:"
+
lll
)
if
a
not
in
s
:
life1
=
life1
+
1
print
(
"SB"
)
if
a
==
lll
:
print
(
"平局"
)
elif
(
a
==
"剪刀"
and
lll
==
"布"
)
or
(
a
==
"石头"
and
lll
==
"剪刀"
)
or
(
a
==
"石头"
and
lll
==
"剪刀"
):
life2
=
life2
-
1
print
(
"牛逼"
,
life1
,
life2
)
else
:
life1
=
life1
-
1
print
(
"你没了"
,
life1
,
life2
)
if
life1
==
0
:
print
(
"哈哈哈,SB一个"
)
break
if
life2
==
0
:
print
(
"你牛逼大了"
)
break
\ 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