Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson4_6
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
4d95a8f1
authored
Oct 23, 2020
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
57b18f02
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
11 deletions
awdad.py
diy2.py
awdad.py
0 → 100644
View file @
4d95a8f1
import
turtle
p
=
turtle
.
Pen
()
s
=
turtle
.
Screen
()
i
=
3
username
=
"python"
userpassword
=
"123456"
while
True
:
if
i
>
0
:
p
.
penup
()
p
.
goto
(
0
,
0
)
name
=
s
.
textinput
(
"请输入用户名:"
,
"VVVVVVV"
)
password
=
s
.
textinput
(
"请输入密码:"
,
"VVVVVVV"
)
if
name
==
username
and
password
==
userpassword
:
s
.
clear
()
p
.
write
(
"登录成功!"
,
font
=
(
"Times"
,
10
,
"normal"
))
break
if
name
!=
username
:
s
.
clear
()
p
.
write
(
"用户名错误"
,
font
=
(
"Times"
,
10
,
"normal"
))
i
-=
1
p
.
goto
(
0
,
20
)
p
.
write
(
"您还剩"
+
str
(
i
)
+
"次输入机会"
,
font
=
(
"Times"
,
10
,
"normal"
))
elif
userpassword
!=
password
:
s
.
clear
()
p
.
write
(
"密码错误"
,
font
=
(
"Times"
,
10
,
"normal"
))
p
.
goto
(
0
,
10
)
i
-=
1
p
.
write
(
"您还剩"
+
str
(
i
)
+
"次输入机会"
,
font
=
(
"Times"
,
10
,
"normal"
))
else
:
p
.
write
(
"你的账户已被锁定,请带身份证来我司解锁"
,
font
=
(
"Times"
,
10
,
"normal"
))
exit
()
p
.
goto
(
0
,
-
20
)
p
.
write
(
"===================="
,
font
=
(
"Times"
,
10
,
"normal"
))
p
.
goto
(
0
,
-
40
)
p
.
write
(
"欢迎来到贝尔编程!"
,
font
=
(
"Times"
,
10
,
"normal"
))
p
.
goto
(
0
,
-
60
)
p
.
write
(
"===================="
,
font
=
(
"Times"
,
10
,
"normal"
))
turtle
.
done
()
\ No newline at end of file
diy2.py
View file @
4d95a8f1
i
=
10
i
=
3
username
=
"python"
userpassword
=
"123456"
while
True
:
...
...
@@ -11,17 +11,13 @@ while True:
if
name
!=
username
:
print
(
"用户名错误"
)
i
-=
1
print
(
"您还剩"
+
str
(
i
)
+
"次输入机会"
)
continue
continue
elif
userpassword
!=
password
:
print
(
"密码错误"
)
i
-=
1
print
(
"
您还剩"
+
str
(
i
)
+
"次输入机会
"
)
elif
name
!=
username
and
userpassword
!=
password
:
print
(
"
输入错误
"
)
else
:
print
(
"你的账户已被锁定,请带身份证来我司解锁"
)
exit
()
print
(
"===================="
)
print
(
"欢迎来到贝尔编程!"
)
print
(
"===================="
)
while
True
:
print
(
"aaaaaaaaaaaaaaaaaaaaaaaaaaaa"
)
\ No newline at end of file
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