This Google Apps Script project automatically generates math quizzes in the form of:
- 📋 Google Forms (MCQ-style, auto-marked)
- 📄 Google Sheets (with question/answer tracking)
- 📑 Printable PDFs (Student & Teacher copies)
Designed for teachers and educators who want to save time preparing math drills for students aged 9–13.
✅ Auto-generates 4 Aktiviti (quizzes) per run
✅ Each Aktiviti has 60 randomized questions
✅ Supports: Addition, Subtraction, Multiplication, Division
✅ MCQ format with 4 choices per question
✅ Sets the correct answer + wrong options automatically
✅ Creates both:
- 🧑🎓 Student version (blank)
- 🧑🏫 Teacher version (with answers)
✅ Auto-grading enabled
✅ Shows results immediately after submission
✅ Collects Name, Class & Email
✅ Response sheet linked for teacher review
✅ Friendly feedback if the answer is wrong
✅ Smart scoring tiers:
- 💚 Above 50% – “Well done!”
- 🧡 30–49% – “Good try, keep practicing!”
- ❤️ Below 30% – “Don’t worry! You can improve!”
This tool was created to support teachers — especially those working with underperforming students or in rural schools — who need to simplify their quiz workflow and make math practice more engaging without the manual headache.
| Google Form (MCQ) | Teacher PDF | Google Sheet |
|---|---|---|
![]() |
![]() |
![]() |
This script uses the Google Apps Script environment to:
- Randomly generate math questions
- Create a new sheet with questions and answers
- Generate a Google Form linked to that sheet
- Export printable PDFs for both student and teacher
- Auto-mark responses and sync to Sheets
- Go to script.new
- Paste in the
Code.gscontents - Save and name your project (e.g. "Maths Generator")
- Run the function
batchGenerateMathsQuizzes - Accept the permission prompts
Done! You’ll now find:
- Forms in your Google Forms
- Sheets in your Drive
- PDFs in separate folders per Aktiviti
- ❌ Does not handle fractions, decimals, or word problems
⚠️ Limited to 4 Aktiviti per run due to execution time limits- ❌ Not designed for advanced math or older students (yet)
- 👩🏫 Primary and middle school math teachers
- 💻 Education tech volunteers and NGOs
- 🧑💼 Developers building tools for education
Want to expand this?
- Add fractions or harder difficulty
- Translate into other languages (BM, CN, etc.)
- Export score reports or summary analytics
PRs welcome!
This project is licensed under the MIT License – free to use, modify, and share.


