Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_2
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
bded76d5
authored
Nov 08, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
570273dd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
diy.py
画风车.py
登陆系统.py
diy.py
0 → 100644
View file @
bded76d5
i
=
0
s
=
0
while
True
:
i
+=
1
s
+=
i
if
i
==
3
:
break
print
(
s
)
\ No newline at end of file
画风车.py
0 → 100644
View file @
bded76d5
"""
"""
使用turtle模块画图
每次移动都增加画笔移动的长度,并旋转91°,重复执行300次,查看效果
"""
import
turtle
pen
=
turtle
.
Pen
()
# 请创造师在下面接着创作
d
=
1
while
d
<
500
:
pen
.
forward
(
d
)
pen
.
right
(
91
)
d
+=
1
# 隐藏画笔,保存画布
pen
.
hideturtle
()
turtle
.
done
()
\ No newline at end of file
登陆系统.py
View file @
bded76d5
username
=
"python"
import
random
import
random
from
time
import
sleep
#导入sleep()函数
i
=
5
username
=
"python"
username
=
"python"
userpassword
=
"123456"
userpassword
=
"123456"
while
True
:
while
True
:
if
i
>
0
:
name
=
input
(
"请输入用户名:"
)
name
=
input
(
"请输入用户名:"
)
password
=
input
(
"请输入密码:"
)
password
=
input
(
"请输入密码:"
)
i
-=
1
if
name
==
username
and
password
==
userpassword
:
if
name
==
username
and
password
==
userpassword
:
print
(
"登录成功!"
)
print
(
"登录成功!"
)
break
break
...
@@ -10,4 +15,6 @@ while True:
...
@@ -10,4 +15,6 @@ while True:
print
(
"用户名不存在,请重新输入!"
)
print
(
"用户名不存在,请重新输入!"
)
if
password
!=
userpassword
:
if
password
!=
userpassword
:
print
(
"密码输入有误,请重新输入!"
)
print
(
"密码输入有误,请重新输入!"
)
print
(
"欢迎来到贝尔编程!"
)
else
:
print
(
"您的账户已被冻结,请联系工作人员解冻"
)
exit
()
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