Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson2-3-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
b6e4b347
authored
Dec 04, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
641eec4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
diy1.py
diy1.py
View file @
b6e4b347
i
=
3
username
=
"python"
userpasswork
=
"121200"
while
True
:
if
i
>
0
:
name
=
input
(
"请输入用户名"
)
passwork
=
input
(
"请输密码"
)
i
-=
1
if
name
==
username
and
passwork
==
userpasswork
:
print
(
"登陆成功"
)
break
if
name
!=
username
:
print
(
"用户名错误,重新输入"
)
print
(
"温馨提示:你还有"
+
str
(
i
)
+
"次机会"
)
continue
if
passwork
!=
usernpasswork
:
print
(
"密码错误,重新输入"
)
print
(
"温馨提示:你还有"
+
str
(
i
)
+
"次机会"
)
else
:
print
(
"你没了"
)
exit
()
\ No newline at end of file
import
turtle
pen
=
turtle
.
Pen
()
pen
.
write
(
"从明天起,做一个幸福的人
\n
喂马、劈柴,周游世界
\n
从明天起,关心粮食和蔬菜
\n
我有一所房子,面朝大海,春暖花开
\n
从明天起,和每一个亲人通信
\n
告诉他们我的幸福
\n
那幸福的闪电告诉我的
\n
我将告诉每一个人
\n
给每一条河每一座山取一个温暖的名字
\n
陌生人,我也为你祝福
\n
愿你有一个灿烂的前程
\n
愿你有情人终成眷属
\n
愿你在尘世获得幸福
\n
我只愿面朝大海,春暖花开。"
,
font
=
(
"times"
,
10
,
"normal"
))
pen
.
hideturtle
()
pen1
=
turtle
.
Pen
()
pen1
.
penup
()
pen1
.
goto
(
0
,
-
180
)
pen1
.
pendown
()
pen1
.
pencolor
(
"orange"
)
pen1
.
pensize
(
10
)
pen1
.
left
(
45
)
pen1
.
forward
(
100
)
pen1
.
circle
(
50
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
50
,
180
)
pen1
.
forward
(
100
)
screen
=
turtle
.
Screen
()
screen
.
bgcolor
(
"lightyellow"
)
turtle
.
done
()
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