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
64c8e543
authored
Oct 27, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
370cf254
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
6 deletions
123.py
23.py
diy1.py
列表.py
123.py
0 → 100644
View file @
64c8e543
#写字
import
turtle
screen
=
turtle
.
Screen
()
#背景
screen
.
bgcolor
(
""
)
pen
=
turtle
.
Pen
()
pen
.
write
(
"今天是
\n
10月22日
\n
我编程了这个作品
\n
运用了turtle模块
\n
还用了变量"
,
font
=
(
"Times"
,
20
,
"normal"
))
#画爱心
pen1
=
turtle
.
Pen
()
pen1
.
pencolor
(
"pink"
)
pen1
.
pensize
(
10
)
pen1
.
fillcolor
(
"pink"
)
pen1
.
begin_fill
()
pen1
.
penup
()
pen1
.
goto
(
-
100
,
50
)
pen1
.
left
(
45
)
pen1
.
forward
(
200
)
pen1
.
circle
(
100
,
180
)
pen1
.
right
(
90
)
pen1
.
circle
(
100
,
180
)
pen1
.
forward
(
200
)
pen1
.
end_fill
()
pen
.
hideturtle
()
pen1
.
hideturtle
()
turtle
.
done
()
23.py
0 → 100644
View file @
64c8e543
username
=
"名侦探柯南"
userpassword
=
"123456789"
name
=
input
(
"请输入您的用户名:"
)
password
=
input
(
"请输入您的用户密码:"
)
if
name
==
username
and
password
==
userpassword
:
print
(
"恭喜您,验证成功,即将进入编程系统"
)
\ No newline at end of file
diy1.py
View file @
64c8e543
username
=
"python"
# 保存在服务器数据库中的用户账号(正确的账号)
username
=
"python"
# 保存在服务器数据库中的用户账号(正确的账号)
userpassword
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
userpassword
=
"123456"
# 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能
# 请用input()实现用户输入账号、密码的功能
# 如果用户输入的账号、密码正确,提示登陆成功
while
True
:
name
=
input
(
"请输入您的用户名:"
)
# 如果用户输入的账号、密码正确,提示登陆成功
password
=
input
(
"请输入您的密码:"
)
\ No newline at end of file
if
name
==
username
and
password
==
userpassword
:
print
(
"登陆成功!"
)
break
if
name
!=
username
:
print
(
"用户名错误,请重新输入:"
)
if
password
!=
userpassword
:
print
(
"密码错误,请重新输入:"
)
print
(
"账号和密码正确,欢迎进入编程世界!"
)
\ No newline at end of file
列表.py
0 → 100644
View file @
64c8e543
# bros=["刘备","关羽","张飞"]
# bros=["刘备","关羽","张飞"]
# print(bros)
b
=
[
"袁术"
,
"夏侯惇"
,
"曹操"
,
"关羽"
,]
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