Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

bellcode / lesson15_1

  • This project
    • Loading...
  • Sign in
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 756da92a authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 6c89ed46
Hide whitespace changes
Inline Side-by-side
Showing with 6 additions and 6 deletions
  • diy1.py
diy1.py
View file @ 756da92a
# 英雄角色类 # 英雄角色类
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.level = 1000 self.level = 9999999999999999999999
self.hp = 99999 self.hp = 999998888777665
self.attack = 999 self.attack = 999888777666555
self.name = name self.name = name
def combat(self,enemy): # 攻击 def combat(self,enemy): # 攻击
...@@ -17,6 +17,6 @@ class Hero(object): ...@@ -17,6 +17,6 @@ class Hero(object):
print(info1 + info2 + info3) print(info1 + info2 + info3)
yase = Hero("垭瑟") lubu = Hero("吕布")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) lubu.combat(houyi)
\ No newline at end of file \ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment