Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_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
7f494420
authored
Jul 03, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
52cbcd3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
diy2.py
diy2.py
View file @
7f494420
...
@@ -2,9 +2,17 @@ class Hero:
...
@@ -2,9 +2,17 @@ class Hero:
def
__init__
(
self
,
ff
,
aa
):
def
__init__
(
self
,
ff
,
aa
):
self
.
ff
=
ff
self
.
ff
=
ff
self
.
aa
=
aa
self
.
aa
=
aa
lufei
=
Hero
(
31
,
5000
)
lufei
=
Hero
(
1
,
5000
)
suolong
=
Hero
(
31
,
4000
)
suolong
=
Hero
(
1
,
4000
)
def
up
():
lufei
.
ff
+=
1
lufei
.
aa
+=
500
def
up2
():
suolong
.
ff
+=
1
suolong
.
aa
+=
500
up
()
up2
()
print
(
"路飞的等级为"
,
lufei
.
ff
)
print
(
"路飞的等级为"
,
lufei
.
ff
)
print
(
"路飞的能力为"
,
lufei
.
aa
)
print
(
"路飞的能力为"
,
lufei
.
aa
)
print
(
"索隆的等级为"
,
suolong
.
ff
)
print
(
"索隆的等级为"
,
suolong
.
ff
)
print
(
"索隆的能力为"
,
suolong
.
aa
)
print
(
"索隆的能力为"
,
suolong
.
aa
)
\ 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