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
69b16d2b
authored
Feb 12, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
ff056a0f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
23 deletions
11.py
snake.py
11.py
View file @
69b16d2b
username
=
"python"
import
turtle
userpassword
=
"123456"
pen
=
turtle
.
Pen
()
i
=
3
pen
.
write
(
"诺伊,
\n
turle真好用,
\n
我会在顶上写字了!"
,
font
=
(
"Times"
,
40
,
"normal"
))
while
True
:
pen
.
hideturle
()
if
i
>
0
:
turtle
.
done
()
name
=
input
(
"hhh"
)
\ No newline at end of file
password
=
input
(
"jjj"
)
i
-=
1
if
name
==
username
and
password
==
userpassword
:
print
(
"fuck"
)
break
if
name
!=
username
:
print
(
"shet"
)
continue
if
password
!=
userpassword
:
print
(
"ccc"
)
print
(
"jjhj"
+
str
(
i
)
+
"hhh"
)
else
:
print
(
"hhgh"
)
exit
()
print
(
"hjhfh"
)
\ No newline at end of file
snake.py
View file @
69b16d2b
import
pygame
import
pygame
from
pygame
import
locals
pygame
.
init
()
pygame
.
init
()
screen
=
pygame
.
display
.
set_mode
((
660
,
480
),
0
,
32
)
screen
=
pygame
.
display
.
set_mode
((
660
,
480
),
0
,
32
)
while
True
:
for
event
in
pygame
.
event
.
get
():
if
event
.
type
==
locals
.
QUIT
:
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