Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_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
5aeca617
authored
Aug 03, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
81e44430
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
53 deletions
1.py
123456789.py
diy1.py
1.py
deleted
100644 → 0
View file @
81e44430
# import turtle
# pen=turtle.Pen()
# pen.pensize(5)
# pen.pencolor("brown")
# pen.left(45)
# pen.forward(100)
# pen.left(90)
# pen.circle(50,180)
# pen.left(180)
# pen.forward(100)
# pen.right(90)
# pen.circle(-50,180)
# turtle.done()
import
turtle
a
=
turtle
.
Pen
()
a
.
pensize
(
5
)
a
.
penup
()
a
.
goto
(
-
100
,
0
)
a
.
pendown
()
a
.
pencolor
(
"blue"
)
a
.
circle
(
50
)
a
.
penup
()
a
.
goto
(
0
,
0
)
a
.
pendown
()
a
.
pencolor
(
"black"
)
a
.
circle
(
50
)
a
.
penup
()
a
.
goto
(
100
,
0
)
a
.
pendown
()
a
.
pencolor
(
"red"
)
a
.
circle
(
50
)
a
.
penup
()
a
.
goto
(
-
50
,
-
75
)
a
.
pendown
()
a
.
pencolor
(
"yellow"
)
a
.
circle
(
50
)
a
.
penup
()
a
.
goto
(
50
,
-
75
)
a
.
pendown
()
a
.
pencolor
(
"light green"
)
a
.
circle
(
50
)
turtle
.
done
()
\ No newline at end of file
123456789.py
deleted
100644 → 0
View file @
81e44430
import
turtle
a
=
turtle
.
Pen
()
b
=
turtle
.
Screen
()
b
.
bgcolor
(
"red"
)
a
.
pencolor
(
"yellow"
)
c
=
b
.
textinput
(
"提示"
,
"新年祝福语"
)
a
.
write
(
c
,
font
=
(
"Times"
,
50
,
"normal"
))
turtle
.
done
()
\ No newline at end of file
diy1.py
View file @
5aeca617
i
=
5
username
=
"ABC"
userpassword
=
"11445"
while
True
:
if
i
>
0
:
name
=
input
(
"请输入账号:"
)
password
=
input
(
"请输入密码:"
)
i
-=
1
if
username
==
name
and
userpassword
==
password
:
print
(
"登录成功!"
)
break
if
name
!=
username
:
print
(
"登录失败!请重新输入账号!"
)
print
(
"你还有"
+
str
(
i
)
+
"次机会"
)
continue
if
password
!=
userpassword
:
print
(
"登录失败!请重新输入密码!"
)
print
(
"你还有"
+
str
(
i
)
+
"次机会"
)
else
:
print
(
"你的账号已被锁定!"
)
exit
()
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