Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
bellcode
/
lesson15_test2
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
d29fe417
authored
Jun 22, 2024
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
aacc01e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletions
demo.py
j43hfhu.py
demo.py
View file @
d29fe417
...
@@ -26,7 +26,8 @@ class Player(Hero):
...
@@ -26,7 +26,8 @@ class Player(Hero):
self
.
hp
=
200
self
.
hp
=
200
self
.
attack
=
50
self
.
attack
=
50
self
.
hero_type
=
hero_type
self
.
hero_type
=
hero_type
print
(
"jiaose"
=
self
.
name
+
"hbvrhguubijbjthtthj6jhti9jutithjhjh6uhj6jhu6:"
,
self
.
hero
-
type
)
print
(
"jiaose"
+
self
.
name
+
"hbvrhguubijbjthtthj6jhti9jutithjhjh6uhj6jhu6:"
,
self
.
hero_
type
)
print
(
"hffj nvrnvfrjemfrvikvjvfhjhg:"
,
self
.
level
,
self
.
hp
,
self
.
attack
)
print
(
"hffj nvrnvfrjemfrvikvjvfhjhg:"
,
self
.
level
,
self
.
hp
,
self
.
attack
)
dhhyu
=
Player
(
"vgngvnu"
,
"ejgyhj"
)
dhhyu
=
Player
(
"vgngvnu"
,
"ejgyhj"
)
fnggnn
=
Hero
(
"egfvbefg"
)
fnggnn
=
Hero
(
"egfvbefg"
)
...
...
j43hfhu.py
0 → 100644
View file @
d29fe417
class
Animal
:
def
__init__
(
self
,
name
):
self
.
name
=
name
def
show_info
(
self
):
return
"egvf3gfejrg :{O}"
.
format
(
self
.
name
)
def
move
(
self
):
print
(
'run run run'
)
class
Cat
(
Animal
)
def
__init__
(
self
,
name
,
age
):
super
()
.
__init__
(
name
)
self
.
age
=
age
cat
=
Cat
(
"tom"
,
2
)
cat
.
move
()
print
(
cat
.
show_info
())
\ 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