Add number-to-text and text-to-number exercises for numbers 0-20#37
Merged
Add number-to-text and text-to-number exercises for numbers 0-20#37
Conversation
Two new categories: number-to-text (multiple choice: pick the word for a digit) and text-to-number (type the digit for a number word). Both support EN and SL localization via translation keys number_0–number_20. Categories are registered in the NumberText group and in 1. razred (year grouping). https://claude.ai/code/session_01RTuNHdUoSZoAnjspngKdkt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces two new exercise categories for learning number representation: converting numbers to their text form and vice versa. These exercises cover numbers 0-20 and are designed as foundational exercises for first-grade students.
Key Changes
New module
src/numberText.ts: Implements problem generation for two new categories:NumberToText_Twenty: Displays a number (0-20) and asks students to select the correct word formTextToNumber_Twenty: Displays a number word and asks students to select the correct numeric valueProblem generation logic:
generateNumberToText(): Creates 21 problems (one per number 0-20) with 3 random distractors for multiple-choice answersgenerateTextToNumber(): Creates 21 problems with numeric answers (no multiple-choice options)Updated
src/common.ts:Categoryenum values:NumberToText_TwentyandTextToNumber_TwentyNumberTextcategory group containing both new categoriesyearGroupsSlfor first-grade ("1. razred") curriculumUpdated
src/translations.ts:Updated
src/problem.ts:numberTextmodule into the problem generation systemImplementation Details
getCurrentLanguage()NumberToText_Twentycategory generates multiple-choice problems with 3 distractors randomly selected from the 0-20 rangeTextToNumber_Twentycategory generates free-response problems (answer is numeric, no options provided)https://claude.ai/code/session_01RTuNHdUoSZoAnjspngKdkt