python3.6
class TestPaper:
def TestQuestion1(self):
print("杨过得到,后来给了郭靖,炼成倚天剑、屠龙刀的玄铁可能是[]",
"a.球磨铸铁 b.马口铁 c.高速合金钢 d.碳素纤维")
print("答案:", self.answer1())
def TestQuestion2(self):
print("杨过、程英、陆无双铲除了情花,造成[]",
"a.使这种植物不再害人 b.使一种珍惜物种灭绝 ",
"c.破坏了那个生物圈的生态平衡 d.造成该地区沙漠化")
print("答案:", self.answer2())
def TestQuestion3(self):
print("蓝凤凰致使华山师徒、桃谷六仙呕吐不止,如果你是大夫,会给他们开什么药[]",
"a.阿司匹林 b.牛黄解毒片 ",
"c.氟哌酸 d.让他们喝大量生牛奶 e.以上全不对")
print("答案:", self.answer3())
def answer1(self):
pass
def answer2(self):
pass
def answer3(self):
pass
class TestPaperA(TestPaper):
def answer1(self):
return "b"
def answer2(self):
return "c"
def answer3(self):
return "a"
class TestPaperB(TestPaper):
def answer1(self):
return "c"
def answer2(self):
return "a"
def answer3(self):
return "a"
if __name__ == "__main__":
print("学生甲抄的试卷:")
studentA = TestPaperA()
studentA.TestQuestion1()
studentA.TestQuestion2()
studentA.TestQuestion3()
print("学生乙抄的试卷:")
studentB = TestPaperB()
studentB.TestQuestion1()
studentB.TestQuestion2()
studentB.TestQuestion3()