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
3886c55a
authored
Feb 26, 2023
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
a8f99f32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
25 deletions
diy2.py
发到你擦拭付款了农村阿
diy2.py
View file @
3886c55a
class
Hero
:
with
open
(
r"C:\User\CM\Documents\lesson13-1\sales_list.txt"
,
"r"
,
encoding
=
"utf-8"
)
as
file
:
def
__init__
(
self
,
name
,
hp
,
attack
):
a
=
file
.
readlines
()
self
.
level
=
1
self
.
name
=
name
for
i
in
a
:
self
.
hp
=
hp
print
(
i
)
self
.
attack
=
attack
def
upgrade
(
self
):
\ No newline at end of file
self
.
level
=
self
.
level
+
1
self
.
hp
=
self
.
hp
+
50
self
.
attack
=
self
.
attack
+
4
yase
=
Hero
(
'yase'
,
300
,
20
)
hy
=
Hero
(
'hy'
,
250
,
23
)
yase
.
upgrade
()
hy
.
upgrade
()
print
(
"等级为:"
,
yase
.
level
)
print
(
"血量为"
,
yase
.
hp
)
print
(
"攻击为"
,
yase
.
attack
)
print
(
"等级为:"
,
hy
.
level
)
print
(
"血量为"
,
hy
.
hp
)
print
(
"攻击为"
,
hy
.
attack
)
\ No newline at end of file
发到你擦拭付款了农村阿
0 → 100644
View file @
3886c55a
szkc看马阿捕v数字您捕局您句张上您成句张您句上张您上张您局马您句张上v您句张上v张上您句张上宸您张上您成张上您您张您备注VN张句VN张看您张刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘v上刘刘刘刘
szkc看马阿捕v数字您捕局您句张上您成句张您句上张您上张您局马您句张上v您句张上v张上您句张上宸您张上您成张上您您张您备注VN张句VN张看您张刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘刘v上刘刘刘刘
\ 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