The Helpful Hint Budget
Simulator preview
Follow instruction sequences to guide the character to the goal.
📁 Tools
▴
- Web browser (Chrome, Edge, Firefox)
- Internet connection
- Scratch 3.0 online editor
🔧 Build Your Helpful Hint Budget
1
Initialize a token allowance variable 'hint_tokens' to 10 at the start of the study session.
2
Program Key 1 to unlock a Light Hint costing 1 token deduction.
3
Program Key 2 to unlock a Deep Solution Hint costing 3 tokens deduction.
4
Implement a boundary guard: if 'hint_tokens < cost', reject the purchase and prompt self-study!
🧩 Block plan / Starter code
▴
when [green flag] clicked
set [hint_tokens v] to [10]
say [Hint Budget: 10 Tokens. Press 1 for Light Hint (1), 2 for Deep Hint (3).]
when [1 v] key pressed // Level 1 Hint (Cost: 1)
if <(hint_tokens) >= [1]> then
change [hint_tokens v] by (-1)
say (join [HINT: Focus on the root word! Tokens left: ] (hint_tokens))
play sound [Coin v]
else
say [Insufficient tokens! Try solving on your own.]
play sound [Low Boop v]
end
when [2 v] key pressed // Level 2 Hint (Cost: 3)
if <(hint_tokens) >= [3]> then
change [hint_tokens v] by (-3)
say (join [DEEP HINT: Formula is Area = L x W. Tokens left: ] (hint_tokens))
play sound [Chime v]
else
say (join [Need 3 tokens for Deep Hint! You have: ] (hint_tokens))
end
Testing 'tokens >= cost' before deduction ensures balances never drop below zero.
⚗️ Test your model
| Test Condition / Action | Expected Result |
|---|---|
| Press 1 with 10 tokens | 1 token deducted; 9 remaining; Light Hint revealed |
| Press 2 with 9 tokens | 3 tokens deducted; 6 remaining; Deep Hint revealed |
| Attempt hint with 0 tokens | Transaction rejected; displays 'Insufficient tokens!' |
⚑ Try a challenge
Award 2 bonus hint tokens whenever the pupil solves a challenge problem with zero hints used!
❓ Quick check
Why does the Hint Budget deduct tokens when a player requests assistance?
📖 Our Story & Concepts
When learning math or coding, having someone hand you the answers instantly prevents your brain from building deep problem-solving muscles. But having zero help when you are stuck causes frustration.
An allowance budget creates healthy boundaries. In video games and productivity apps, digital economies use tokens, energy bars, and cooldown timers to balance assistance and independent achievement.
</> Full Annotated Code Walkthrough
// Complete Hint Economy System with Reward Mechanism
when [green flag] clicked
set [hint_tokens v] to [10]
set [questions_solved_solo v] to [0]
broadcast [show_hud v]
when [1 v] key pressed
if <(hint_tokens) >= [1]> then
change [hint_tokens v] by (-1)
say [Light clue: Check your signs!] for (2) seconds
else
say [Out of tokens! Earn more by solving solo.] for (2) seconds
end
when [c v] key pressed // Correct answer solved independently
change [questions_solved_solo v] by (1)
change [hint_tokens v] by (2) // Reward tokens!
play sound [Fanfare v]
say (join [Great job! +2 Bonus Tokens! Total: ] (hint_tokens)) for (2) seconds
Testing 'tokens >= cost' before deduction ensures balances never drop below zero.
▷ Expected Results & Troubleshooting
| Test Condition / Action | Expected Result |
|---|---|
| Press 1 with 10 tokens | 1 token deducted; 9 remaining; Light Hint revealed |
| Press 2 with 9 tokens | 3 tokens deducted; 6 remaining; Deep Hint revealed |
| Attempt hint with 0 tokens | Transaction rejected; displays 'Insufficient tokens!' |
⚑ Extension Challenges & Blueprints
⚑ Extension Challenges
- Level 1: Add a Level 3 Full Walkthrough hint that costs 5 tokens.
- Level 2: Limit the total hints per question to a maximum of 2.
- Level 3: Create a scoreboard showing tokens saved at the end of the 10-question quiz.
❓ Check Your Understanding
Question 1: Why does the Hint Budget deduct tokens when a player requests assistance?
Question 2: What condition check prevents the player's token count from dropping below zero into negative numbers?
Question 3: A player has 2 tokens left. Can they unlock a Level 3 Full Solution that costs 3 tokens?
Question 4: What block is used in Scratch to subtract 1 token from the player's budget?
Feedback appears after you check your answer.