返回顶部
e

exam-generator试卷生成器

中国中小学试卷生成器。Use when teacher needs to create exam papers for Chinese primary/middle school. Supports all subjects, multiple question types, official curriculum standards, and accurate answers. Uses web search for latest knowledge. 试卷生成、出题、考试卷。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.3
安全检测
已通过
273
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

exam-generator

中国中小学试卷生成器

专业试卷生成工具,支持中国中小学各学科,遵循官方课程标准,确保试题准确性。

功能特性

  • - 📚 全学科支持: 语文、数学、英语、物理、化学、生物、历史、地理、政治
  • 📊 多种题型: 选择题、填空题、判断题、简答题、计算题、作文题
  • 🎯 精准出题: 根据知识点和难度要求生成
  • 🌐 联网验证: 使用网络搜索获取最新知识和标准答案
  • 📐 专业排版: 标准试卷格式,可直接打印
  • 答案准确: 交叉验证确保答案正确

支持的学科

学科年级题型
语文小学/初中选择、填空、阅读、作文
数学
小学/初中 | 选择、填空、计算、应用 | | 英语 | 小学/初中 | 选择、填空、阅读、写作 | | 物理 | 初中 | 选择、填空、实验、计算 | | 化学 | 初中 | 选择、填空、实验、计算 | | 生物 | 初中 | 选择、填空、简答 | | 历史 | 初中 | 选择、填空、简答 | | 地理 | 初中 | 选择、填空、读图 | | 政治 | 初中 | 选择、填空、简答 |

触发条件

  • - 生成一份试卷 / Create an exam
  • 出一套数学题 / Generate math problems
  • 帮我出英语试卷 / Create English test
  • 根据知识点出题 / Generate questions for topics
  • exam-generator

步骤一:理解用户需求

请提供以下信息:

学科:语文/数学/英语/物理/化学...
年级:小学X年级/初中X年级
知识点:具体要考察的知识点
题型:选择题/填空题/简答题...
题量:各题型数量
难度:简单/中等/困难
时间:考试时长(分钟)



步骤二:获取最新知识(联网验证)

使用网络搜索技能获取准确的知识点和标准答案:

Agent自动调用网络搜索技能搜索:

  • - 学科知识点
  • 标准答案
  • 官方课程标准

知识验证流程

生成试题

搜索标准答案

交叉验证

标记置信度

输出试题



步骤三:生成试卷

Python代码示例

python
import os
from datetime import datetime

class ExamGenerator:
def init(self, subject, grade, title=考试试卷):
self.subject = subject
self.grade = grade
self.title = title
self.questions = []
self.answers = []

def addchoicequestion(self, question, options, answer, score=2):
添加选择题
self.questions.append({
type: choice,
question: question,
options: options,
score: score
})
self.answers.append({
type: choice,
answer: answer,
score: score
})

def addfillblank(self, question, answer, score=2):
添加填空题
self.questions.append({
type: fill,
question: question,
score: score
})
self.answers.append({
type: fill,
answer: answer,
score: score
})

def addtruefalse(self, question, answer, score=1):
添加判断题
self.questions.append({
type: true_false,
question: question,
score: score
})
self.answers.append({
type: true_false,
answer: answer,
score: score
})

def addshortanswer(self, question, answer, score=10):
添加简答题
self.questions.append({
type: short_answer,
question: question,
score: score
})
self.answers.append({
type: short_answer,
answer: answer,
score: score
})

def add_calculation(self, question, answer, score=15):
添加计算题
self.questions.append({
type: calculation,
question: question,
score: score
})
self.answers.append({
type: calculation,
answer: answer,
score: score
})

def add_essay(self, question, requirements, score=30):
添加作文题
self.questions.append({
type: essay,
question: question,
requirements: requirements,
score: score
})
self.answers.append({
type: essay,
answer: 见评分标准,
score: score
})

def generate_exam(self, lang=zh):
生成试卷
total_score = sum(q[score] for q in self.questions)

if lang == zh:
return self.generatechinese(total_score)
else:
return self.generateenglish(total_score)

def generatechinese(self, total_score):
生成中文试卷
output = []
output.append(f┌{─*60}┐)
output.append(f│ {self.title})
output.append(f│ {self.subject} · {self.grade})
output.append(f│ 考试时间:90分钟 · 满分:{total_score}分)
output.append(f└{─*60}┘)
output.append()
output.append(姓名: 班级: 学号:)
output.append()

choice_num = 1
fill_num = 1
tf_num = 1
other_num = 1

for q in self.questions:
if q[type] == choice:
output.append(f一、选择题(每题{q[score]}分))
output.append()
output.append(f{choice_num}. {q[question]})
for i, opt in enumerate(q[options]):
output.append(f {chr(65+i)}. {opt})
output.append()
choice_num += 1

elif q[type] == fill:
output.append(f二、填空题(每空{q[score]}分))
output.append()
output.append(f{fill_num}. {q[question]})
output.append( 答案:)
output.append()
fill_num += 1

elif q[type] == true_false:
output.append(f三、判断题(每题{q[score]}分))
output.append()
output.append(f{tf_num}. {q[question]} ( ))
output.append()
tf_num += 1

elif q[type] == short_answer:
output.append(f四、简答题(每题{q[score]}分))
output.append()
output.append(f{other_num}. {q[question]})
output.append()
output.append()
output.append()
other_num += 1

elif q[type] == calculation:
output.append(f五、计算题(每题{q[score]}分))
output.append()
output.append(f{other_num}. {q[question]})
output.append()
output.append()
output.append()
other_num += 1

elif q[type] == essay:
output.append(f六、作文({q[score]}分))
output.append()
output.append(f{q[question]})
output.append(f要求:{q.get(requirements, )})
output.append()
output.append()
output.append()

return \n.join(output)

def generateanswersheet(self, lang=zh):
生成答案
output = []
output.append(f{=*60})
output.append(f{self.title} - 参考答案)
output.append(f{=*60})
output.append()

for i, a in enumerate(self.answers, 1):
output.append(f{i}. {a[answer]} ({a[score]}分))

return \n.join(output)

def save(self, output_dir):
保存试卷和答案(Word格式)
from docx import Document
from docx.shared import Pt, Cm
from docx.enum.text import WDALIGNPARAGRAPH

os.makedirs(outputdir, existok=True)

# 生成试卷Word文档
doc = Document()

# 设置页面
section = doc.sections[0]
section.top_margin = Cm(2.54)
section.bottom_margin =

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 exam-generator-1776010921 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 exam-generator-1776010921 技能

通过命令行安装

skillhub install exam-generator-1776010921

下载

⬇ 下载 exam-generator v1.0.3(免费)

文件大小: 4.75 KB | 发布时间: 2026-4-13 10:12

v1.0.3 最新 2026-4-13 10:12
清理测试文件,重新发布

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部