Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
pygame_lesson1_3
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
49d9da44
authored
Nov 04, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
2652f537
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
333.py
7.py
j.py
snake.py
wg.py
333.py
0 → 100644
View file @
49d9da44
class
Person
():
def
__init__
(
self
,
name
,
gender
,
age
,
birth
):
self
.
name
=
name
self
.
gender
=
gender
self
.
age
=
age
self
.
birth
=
birth
def
speak
():
print
(
"我叫"
,
self
.
name
)
print
(
"我今年"
,
self
.
age
)
print
(
"我出生于"
,
self
.
birth
)
7.py
0 → 100644
View file @
49d9da44
class
Cat
:
def
eat
(
self
,
name
):
self
.
name
=
name
print
(
self
.
name
+
"喜欢吃榴莲"
)
sb
=
Cat
()
sb
.
eat
(
"bs"
)
j.py
0 → 100644
View file @
49d9da44
class
Zfx
():
def
__init__
(
self
,
d
):
self
.
d
=
d
def
C
(
self
):
print
(
d
*
4
)
sb
=
Zfx
(
4
)
sb
.
C
\ No newline at end of file
snake.py
View file @
49d9da44
import
pygame
# 初始化pygame,为使用pygame做准备
pygame
.
init
()
# 创建一个窗口
guvvj
=
pygame
.
display
.
set_mode
((
660
,
440
))
while
True
:
\ No newline at end of file
wg.py
0 → 100644
View file @
49d9da44
#letter =('a','b',['A','B'])
#letter[2][0] = 'x'
#letter[2][1]= 'y'
#print(letter)
student1
=
(
'sy'
,
'yy'
,[
'yp'
,[
'zp'
,
'zf'
]])
#student1[2][0] = 'a'
print
(
student1
[
2
][
1
][
0
])
\ 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