Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson3-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
bffe9b4b
authored
May 02, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
8ea75886
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
9 deletions
135.py
222.py
3.1.py
999.py
135.py
0 → 100644
View file @
bffe9b4b
import
turtle
screen
=
turtle
.
Screen
()
a
=
screen
.
textinput
(
""
)
\ No newline at end of file
222.py
0 → 100644
View file @
bffe9b4b
'''
import turtle
pen=turtle.Pen()
screen=turtle.Screen()
a=screen.textinput("问图形","要多大的图形")
a1=int(a)
pen.penup()
pen.goto(-100,-100)
pen.pendown()
pen.pencolor("black")
for i in range(4):
pen.forward(200)
pen.left(90)
pen.penup()
pen.goto(0,-a1)
pen.pendown()
pen.fillcolor("blue")
pen.begin_fill()
pen.circle(a1,360)
pen.end_fill()
turtle.done()
'''
import
turtle
pen
=
turtle
.
Pen
()
pen
.
pensize
(
5
)
pen
.
speed
(
5
)
pen
.
pencolor
(
"blue"
)
pen
.
circle
(
50
)
pen
.
penup
()
pen
.
pencolor
(
"red"
)
pen
.
forward
(
80
)
pen
.
pendown
()
pen
.
circle
(
50
)
pen
.
penup
()
pen
.
pencolor
(
"black"
)
pen
.
forward
(
80
)
pen
.
pendown
()
pen
.
circle
(
50
)
pen
.
penup
()
pen
.
forward
(
-
50
)
pen
.
pencolor
(
"green"
)
pen
.
left
(
90
)
pen
.
forward
(
50
)
pen
.
left
(
90
)
pen
.
pendown
()
pen
.
circle
(
50
)
pen
.
penup
()
pen
.
forward
(
70
)
pen
.
pencolor
(
"yellow"
)
pen
.
pendown
()
pen
.
circle
(
50
)
turtle
.
done
()
3.1.py
View file @
bffe9b4b
name
=
"wln"
name
=
"1"
mm
=
"xuebi710068"
i
=
3
unname
=
input
(
"用户名:"
)
mm
=
"123456"
unmm
=
input
(
"密码:"
)
while
True
:
if
unname
==
name
and
unmm
==
mm
:
if
i
>
0
:
print
(
"登录成功"
)
unname
=
input
(
"用户名:"
)
else
:
unmm
=
input
(
"密码:"
)
print
(
"gun"
)
if
unname
=
name
and
unmm
=
mm
:
\ No newline at end of file
print
(
"欢迎"
)
break
if
unname
!=
name
:
print
(
"请重新输入用户名"
)
continue
if
unmm
!=
mm
and
unname
=
name
:
print
(
"请重新输入密码"
)
else
:
print
(
"no"
)
exit
()
print
(
"欢迎"
)
999.py
0 → 100644
View file @
bffe9b4b
c
=
0
p
=
0
for
i
in
range
(
3
):
P
=
input
(
"你要出什么?"
)
print
(
"玩家出"
+
P
)
import
random
qwe
=
[
"石头"
,
"剪刀"
,
"布"
]
C
=
random
.
choice
(
qwe
)
print
(
"电脑出"
+
C
)
if
P
in
qwe
:
if
P
==
"石头"
and
C
==
"剪刀"
or
P
==
"剪刀"
and
C
==
"布"
or
P
==
"布"
and
C
==
"石头"
:
print
(
"玩家赢"
)
p
=
p
+
1
elif
C
==
"石头"
and
P
==
"剪刀"
or
C
==
"剪刀"
and
P
==
"布"
or
C
==
"布"
and
P
==
"石头"
:
print
(
"电脑赢"
)
c
=
c
+
1
else
:
print
(
"平局"
)
else
:
print
(
"请重新输入"
)
continue
print
(
"玩家:电脑 "
+
str
(
p
)
+
":"
+
str
(
c
))
\ 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