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

Administrator / level3-lesson19-diy1

  • 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 14614680 authored 11 months ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent f50090a3
Hide whitespace changes
Inline Side-by-side
Showing with 18 additions and 0 deletions
  • 2.py
2.py
View file @ 14614680
lass Hero:
def __init__(self):
self.level = 99999999999999999999999999999999999999999999999999999999999
self.hp = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
self.attack = 999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
yase = Hero("亚瑟",100,200)
print(yase.hp1)
houyi = Hero('后翌',150,120)
print(houyi.hp1)
def upgrede():
yase.hp1 = yase.hp1*2
yase.level = yase.level+1
yase.attack1 = yase.attack*2
yase = Hero("亚瑟",100,200)
yase.upgrede()
print(yase.hp1)
print(yase.hp1)
\ 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