Exerpad
🔥 0
0 XP
Exercise 11 · Chapter: ConditionsOptional+50 XP

Coin Quest: Can You Afford It?

🪙 A shiny shield hangs in the shop window. It costs 12 coins.

Read how many coins the player has (a whole number), then decide:

  • Enough coins → print You bought the shield!
  • Not enough → print Not enough coins!
Need a hint?
2 available · costs 5 XP each
javascript

Output
Run your code to see the output here.