{% extends "base.html" %} {% block title %}QuizTrainer - 统计分析{% endblock %} {% block content %}
{{ stats.total_questions }}
总答题数
{{ stats.correct_count }}
答对题目
{{ stats.total_questions - stats.correct_count }}
答错题目
{{ stats.accuracy }}%
总体正确率

分类正确率

{% if stats.category_stats %}
{% for category, stat in stats.category_stats.items() %} {% set accuracy = (stat.correct / stat.total * 100) if stat.total > 0 else 0 %}
{{ category }}
{{ accuracy | round(0) }}%
{% endfor %}
{% else %}

暂无分类统计数据

{% endif %}

答题正确率分布

{% if stats.total_questions > 0 %}
{{ stats.accuracy }}%
正确 {{ stats.correct_count }}
错误 {{ stats.total_questions - stats.correct_count }}
{% else %}

暂无答题数据

{% endif %}
{% if stats.difficulty_stats %}

难度分布

{% for difficulty, stat in stats.difficulty_stats.items() %}
{{ stat.total }}
{% if difficulty == 'easy' %}简单{% elif difficulty == 'medium' %}中等{% else %}困难{% endif %}题目
{% if stat.correct > 0 %}
正确 {{ stat.correct }} 道
{% endif %}
{% endfor %}
{% endif %}

学习建议

{% if stats.accuracy >= 80 %}
表现优秀! 您的正确率达到 {{ stats.accuracy }}%,继续保持。建议挑战更难的题目提升自己。
{% elif stats.accuracy >= 60 %}
还需努力! 您的正确率为 {{ stats.accuracy }}%,建议针对错题进行专项练习。
{% elif stats.total_questions > 0 %}
多加练习! 您的正确率为 {{ stats.accuracy }}%,建议从简单题目开始,逐步提升难度。
{% else %}
开始学习! 还没有答题记录,赶紧开始你的第一次答题吧!
{% endif %}
{% endblock %}