Commit 96a40dab by BellCodeEditor

save project

parent 9cbcb9f1
Showing with 38 additions and 5 deletions
a=float(input())
b=float(a*2+2)
z=float(a+b)*2
m=float(a*b)
print(z)
print(m)
print(m//1)
\ No newline at end of file
import turtle
pen=turtle.Pen()
pen.down()
for i in range(3):
pen.left(120)
pen.forward(100)
pen.up()
pen.forward(120)
pen.down()
pen.left(120)
pen.forward(150)
pen.left(28)
pen.forward(50)
for i in range(5):
pen.forward(150)
pen.left(70)
pen.forward(50)
pen.forward(-50)
turtle.done()
......@@ -5,6 +5,7 @@ class Hero: # 英雄类
self.hp = 250
self.attack = 40
self.max_hp = self.hp
def combat(self, enemy): # 攻击功能
......@@ -25,15 +26,16 @@ class Hero: # 英雄类
class Player(Hero):
def __init__(self,name):
# 玩家英雄
super().__init__(name)
super(Palyer,self).__init__(name)
self.hp=200
self.attack=50
print("玩家的血量值为:",Player.hp)
print("玩家的攻击力为:",Player.attack)
player = Player("后羿")
print("玩家的血量值为:",player.hp)
print("玩家的攻击力为:",player.attack)
houyi=Player("后羿")
#print("玩家的血量值为:",player.hp)
#print("玩家的攻击力为:",player.attack)
print("hello world!")
\ 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