Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
lesson14_4
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
497dbaa8
authored
Sep 11, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
881d5449
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
diy3.py → diy4.py
diy
3
.py
→
diy
4
.py
View file @
497dbaa8
...
@@ -4,17 +4,11 @@ class Hero:
...
@@ -4,17 +4,11 @@ class Hero:
self
.
name
=
name
self
.
name
=
name
self
.
hp
=
hp
self
.
hp
=
hp
self
.
attack
=
attack
self
.
attack
=
attack
GUY
=
Hero
(
"GUY"
,
10492
,
10492
)
def
update
():
self
.
level
=
self
.
level
+
10492
self
.
hp
=
self
.
hp
+
10492
self
.
attack
=
self
.
attack
+
10492
INCENDIARYBOTTLEGIRL
=
Hero
(
"INCENDIARYBOTTLEGIRL"
,
10492
,
10492
)
INCENDIARYBOTTLEGIRL
=
Hero
(
"INCENDIARYBOTTLEGIRL"
,
10492
,
10492
)
def
update
():
GUY
.
level
=
GUY
.
level
+
10492
GUY
.
hp
=
GUY
.
hp
+
10492
GUY
.
attack
=
GUY
.
attack
+
10492
INCENDIARYBOTTLEGIRL
.
level
=
INCENDIARYBOTTLEGIRL
.
level
+
10492
INCENDIARYBOTTLEGIRL
.
hp
=
INCENDIARYBOTTLEGIRL
.
hp
+
10492
INCENDIARYBOTTLEGIRL
.
attack
=
INCENDIARYBOTTLEGIRL
.
attack
+
10492
print
(
"GUY的攻击力是:"
,
GUY
.
attack
)
print
(
"INCENDIARYBOTTLEGIRL的攻击力是:"
,
INCENDIARYBOTTLEGIRL
.
attack
)
print
(
"INCENDIARYBOTTLEGIRL的攻击力是:"
,
INCENDIARYBOTTLEGIRL
.
attack
)
update
()
update
()
print
(
"GUY的攻击力是:"
,
GUY
.
attack
)
print
(
"INCENDIARYBOTTLEGIRL的攻击力是:"
,
INCENDIARYBOTTLEGIRL
.
attack
)
print
(
"INCENDIARYBOTTLEGIRL的攻击力是:"
,
INCENDIARYBOTTLEGIRL
.
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