实装自动评分系统

This commit is contained in:
2025-08-06 06:46:30 +08:00
parent edf2f0868a
commit 6d3d2e665c
5 changed files with 20 additions and 294 deletions

View File

@@ -108,14 +108,14 @@ class SelectionPuzzle(Puzzle):
def __str__(self):
return f"{self.wording}\n正确答案: {', '.join(self.answer)}"
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)
if __name__ == "__main__":
puz = SelectionPuzzle(
{"1+1": "2", "1+2": "3", "1+3": "4"},
["2", "5", "0"],
3,
'求值: '
)
puz.refresh()
print(puz.wording)
print(puz.answer)
print(puz.options)