Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_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
ea691e3c
authored
Jun 12, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
ef32e263
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
diy2.py
diy2.py
View file @
ea691e3c
class
Hero
:
def
__init__
(
self
,
name
,
hp
,
attack
):
self
.
level
=
1
self
.
name
=
name
self
.
hp
=
hp
self
.
attack
=
attack
hero01
=
Hero
(
'亚瑟'
,
200
,
30
)
hero01
.
hp
=
350
print
(
'英雄的名字为: '
+
hero01
.
name
)
print
(
'英雄的血量为: '
+
str
(
hero01
.
hp
))
\ No newline at end of file
class
hero
:
def__init__
(
self
):
self
.
level
=
10000000
self
.
hp
=
1234567890
self
.
df
=
99999999999999999999999999
self
.
attack
=
123456789012345678901246890
ikun
=
Hero
()
print
(
ikun
.
hp
)
\ 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