Commit 064c1280 by BellCodeEditor

auto save

parent ee87e996
Showing with 73 additions and 18 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
houyi = Hero("后羿",240,23)
houyi.upgrade()
print("等级为:",houyi.level)
print("血量值为:",houyi.hp)
print("攻击力为:",houyi.attack)
\ No newline at end of file
'''import form t
'''import form t
turtle.pen()
turtle.pencolor("black")
turtle.pensize(2)
turtle.circle(60)'''
'''a=10
b=20
print(a,b)'''
'''a=10
b=20
print(a 0r b)'''
'''a=10
b=20
not(a and b)'''
'''a=10
b=20
not(a or b)'''
#print(2+eval("3"))
#print(type("3"))
'''print("Hello",end="")
print("world")'''
'''print("Hello")
print("world")'''
'''import turtle
turtle.penup()
turtle.clear()
turtle.goto(0,0)
turtle.pen()
turtle.pensize(10)
turtle.pencolor("black")
turtle.fillcolor("blue")
turtle.begin_fill()
turtle.setheading(0)
turtle.circle(50)
turtle.end_fill()
turtle.forward(90)
turtle.left(120)
turtle.forward(180)
turtle.goto(0,0)
turtle.setheading(180)
turtle.forward(90)
turtle.right(120)
turtle.forward(180)
turtle.penup()
turtle.done()'''
'''while True:
import random
lis=["0","1","2","3","4","5","6","7","8","9"]
caipiao=random.sample(lis,5)
caipiao=".join(caipiao)
random numbers=input("输入号")
if random numbers==caipiao:
print("奖金:10000元")
else:
i=0
for j in random numbers:
for c in caipiao:
if j==c:
i+=1
print("彩票号:"+caipiao)
print("")'''
'''a=0
for i in range(0,21):
a=a+i
print(a)'''
#print(sum(range(1,21)))
a=0
b=0
while b<100:
b=b+1
a+=b
print(a)
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