Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_1
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
bc868860
authored
Mar 13, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
1a7f5ab5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
7 deletions
1.py
diy.py
1.py
deleted
100644 → 0
View file @
1a7f5ab5
This diff is collapsed.
Click to expand it.
diy.py
View file @
bc868860
...
...
@@ -5,12 +5,21 @@ class Hero:
self
.
hp
=
hp
self
.
attack
=
attack
def
sj
(
):
yase
.
hp
+=
175
yase
.
level
+=
1
yase
.
attack
+=
129
def
ugrade
(
self
):
self
.
hp
+=
175
self
.
level
+=
1
self
.
attack
+=
129
yase
=
Hero
(
"亞瑟"
,
4536
,
180
)
houyi
=
Hero
(
"後羿"
,
2981
,
217
)
sj
()
print
(
yase
.
hp
)
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
yase
.
ugrade
()
print
(
"等级为:"
,
yase
.
level
)
print
(
"血量为:"
,
yase
.
hp
)
print
(
"攻击力为:"
,
yase
.
attack
)
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