Commit 26fd95f5 by BellCodeEditor

auto save

parent 4c11decd
Showing with 67 additions and 1 deletions
......@@ -46,7 +46,7 @@ class Player(Hero):
houyi = Player("射手", "后羿")
yase = Hero("瑟")
yase = Hero("瑟")
# yase.combat(houyi)
# houyi.cure()
......
# class Stubit:
# def __init__(self,name,age,score):
# self.name = name
# self.age = age
# self.score = score
# def get_name(self):
# return self.name
# def get_age(self):
# return self.age
# def get_score(self):
# return max(self.score)
# stubit = Stubit("潘伞兵",8,[10,22,5])
# print(stubit.get_name())
# print(stubit.get_age())
# print(stubit.get_score())
class C:
def __init__(self,m,mo):
self.m =m
self.mo =mo
def output_c(self):
return "制造商" + self.m + ",型号" + self.mo
class Ec(C):
def __init__(self,m,mo,bs):
super().__init__(m,mo)
self.bs =bs
def output_b(self):
return "这辆汽车还有" + str(self.bs) + "千瓦时电量"
mc = Ec("比亚迪" , "汉-超跑版" , 60)
print(mc.output_c())
print(mc.output_b())
\ No newline at end of file
from random import*
sqstr=0
# print("答对了")
while sqstr<100:
sbstr=randint(10,99)
sdstr=randint(10,99)
sxstr=input(str(sbstr)+"+"+str(sdstr)+"=")
try:
dsbstr=sbstr+sdstr
dsxstr=int(sxstr)
# if dsxstr==dsbstr:
# sqstr+=10
# print("答对了")
except:
print("sb")
else:
if dsxstr==dsbstr:
sqstr+=10
print("答对了")
\ 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