Commit c1f013fc by BellCodeEditor

save project

parent 70850cf8
Showing with 10 additions and 0 deletions
class Bird:
def __init__(self,name,hp,attack):
self.name=name
self.hp=hp
self.attack=attack
redbird=Bird("红色小鸟",500,50)
bluebird=Bird("蓝色小鸟",450,55)
print("红色小鸟的血量为:",redbird.hp)
print("蓝色小鸟的血量为:",bluebird.hp)
\ 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