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
0160b908
authored
Nov 20, 2021
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto save
parent
eb31edd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
diy.py
diy.py
View file @
0160b908
...
@@ -5,8 +5,15 @@
...
@@ -5,8 +5,15 @@
#英雄角色:yase(亚瑟)、houyi
#定义一个升级方法upgrade:等级每升一级,血量增加50,攻击力加4
yase
=
Hero
()
#打印yase的血量
print
(
'yase的血量为'
,
?
)
#打印yase的攻击力
#英雄角色:yase(亚瑟,300,20)
\ No newline at end of file
#打印亚瑟的初始血量值
#等级提升2级(调用两次upgrade方法)
#打印升级2次后的血量值
\ 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