Commit 362320ad by BellCodeEditor

save project

parent 9a581ef4
Showing with 14 additions and 2 deletions
...@@ -6,8 +6,9 @@ class Hero(object): ...@@ -6,8 +6,9 @@ class Hero(object):
self.attack = 40 self.attack = 40
self.name = name self.name = name
def combat(): # 攻击 def combat(self,enemy): # 攻击
??? enemy.hp-=self.attack
print(self.name+'对'+enemy.name+'进行平A,造成'+self.attack+'点伤害')
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
......
print(*values: object, sep: Text=..., end: Text=..., file: Optional[_Writer]=..., flush: bool=...) -> None
param *values: object
print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.
\ No newline at end of file
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