
A wishing hat that teaches hard work beats wishes.
The Old Japi
In a village near Nagaon, a boy named Rituraj was helping his grandfather clear the old storeroom when he found it — a japi, the traditional bamboo hat of Assam, dusty and forgotten behind a stack of old rice baskets.
But this japi was different. Instead of plain bamboo, it was decorated with tiny painted scenes — rice fields, rivers, elephants, and a sun made of real gold thread. It was the most beautiful japi Rituraj had ever seen.
"Whose was this?" Rituraj asked.
His grandfather squinted. "I've never seen that before. Must have been your great-great-grandfather's."
The First Wish
That night, Rituraj put the japi on his head — just for fun — and said, "I wish I had a bicycle."
The japi hummed. A warm vibration spread from the bamboo through Rituraj's head and down to his toes. And the next morning, leaning against the mango tree, was a brand-new red bicycle.
"It works!" Rituraj shouted.
He wished for a cricket bat. It appeared. He wished for a kite. It appeared. He wished for a jar of jaggery — his favourite sweet — and it appeared on the kitchen table.
The Wishes Get Bigger
Rituraj's wishes grew. He wished for a TV. For new clothes. For a smartphone. Each wish came true by morning. His family was confused but happy.
But Rituraj noticed something strange. Every time he made a wish, the japi became a little lighter. The gold thread dimmed. The painted scenes faded. The bamboo felt thinner, as if the hat was using itself up.
After ten wishes, the japi looked old and tired. The gold sun was barely visible. The elephants had faded to ghosts.
The Grandfather's Lesson
Rituraj showed the fading japi to his grandfather.
"Ah," said his grandfather. "Now I remember. My grandmother told me about this hat. It was made by a master craftsman who wove a single rule into the bamboo: every wish costs a piece of the hat. When the hat is gone, the wishes stop — and everything they gave you disappears too."
Rituraj looked at the bicycle. The cricket bat. The TV. All of it would vanish.
"How many wishes are left?" he asked.
"Only you and the hat know that," said his grandfather.
The Last Wish
Rituraj thought for three days. He could wish for something enormous — a house, a car, money. But it would all disappear when the hat crumbled.
On the fourth day, he put the japi on his head and said: "I wish to know how to make things with my own hands."
The japi hummed one last time — louder and warmer than ever before — and then crumbled into dust. But Rituraj felt something new inside him: knowledge. He knew how to weave bamboo. How to build a shelf. How to fix a bicycle. How to cook.
The bicycle vanished. The TV vanished. The smartphone vanished. But the knowledge stayed, because knowledge isn't a thing — it's a part of you.
Rituraj spent that summer building a bicycle from scrap parts. It wasn't as shiny as the wished-for one. It squeaked when he pedalled. But it was his, and it would never disappear.
The end.
Choose your level. Everyone starts with the story — the code gets deeper as you go.
Here is a taste of what Level 1 looks like for this lesson:
# Which shapes can tile a floor?
# Test if a regular polygon's angle divides into 360°
for sides in range(3, 13):
angle = (sides - 2) * 180 / sides
fits = 360 % angle == 0
name = {3:"Triangle", 4:"Square", 5:"Pentagon",
6:"Hexagon", 7:"Heptagon", 8:"Octagon",
9:"Nonagon", 10:"Decagon", 11:"Hendecagon",
12:"Dodecagon"}[sides]
status = "YES - tiles!" if fits else "no - leaves gaps"
print(f"{name:12s} ({sides} sides, {angle:5.1f}°): {status}")
# Only 3 shapes say YES — can you predict which?This is just the first of 6 coding exercises in Level 1. By Level 4, you will build: Design an Optimal Sun Hat Using Geometry.
By Level 4, enrolled students build: Design an Optimal Sun Hat Using Geometry
Free
Level 0: Listener
Stories, science concepts, diagrams, quizzes. No coding.
You are here
Level 0 is always free. Coding levels (1-4) are part of our 12-Month Curriculum.
A wishing hat that teaches hard work beats wishes.
The big idea: "The Magic Japi Hat" teaches us about Geometry & Traditional Design — and you don't need to write a single line of code to understand it.
Look at the floor of your room. If it has tiles, notice how they fit together — no gaps, no overlaps, every piece the same shape, repeating over and over. That repetition is what makes it a pattern. But here is a question most people never ask: why tiles and not random blobs? Why do floors use squares or rectangles instead of, say, stars or circles?
Try this experiment in your head. Imagine covering a table with coins (circles). No matter how carefully you arrange them, there will always be gaps between the coins — little curved triangles of empty space. Circles cannot tile a flat surface. Now imagine using square coasters instead. They fit perfectly — no gaps, no overlaps. Squares work. Circles do not.
This is not just about floors. It is a deep mathematical fact about shapes. Only three regular shapes can tile a flat surface all by themselves: triangles, squares, and hexagons. That is it. Not pentagons (they leave gaps). Not octagons (gaps again). Just those three. Every tiled floor, every honeycomb, every woven mat in the world uses one of these three shapes — or a clever combination of them.
Check yourself: Why can hexagons tile a surface but pentagons cannot? (Hint: think about the angles at each corner. At a meeting point, the angles must add up to exactly 360°. A hexagon's corner is 120° — three of them make 360°. A pentagon's corner is 108° — three make only 324°, leaving a gap.)
Key idea: Only triangles, squares, and hexagons can tile a flat surface alone — because only their corner angles divide evenly into 360°. This simple rule governs every tiled floor and woven pattern in the world.
The japi is the iconic broad-brimmed hat of Assam — woven from bamboo and palm leaf, shaped like a wide cone, and decorated with patterns that have been passed down for generations. But the japi is not just art. It is geometry you can wear.
Look at a japi from above. The weaving uses three sets of bamboo strips, crossing each other at 60-degree angles. When three lines cross at 60°, they naturally create hexagons — the same shape as honeycomb cells. The japi weaver is building a hexagonal grid without ever thinking about geometry class.
Why does this work so well? Because a hexagonal weave locks every strip in place from two different directions. In an ordinary cloth weave (like your shirt), strips cross at 90° — just two directions. Pull diagonally, and the fabric stretches and distorts. But the japi's three-direction weave resists pulling in every direction equally. It is why the hat keeps its shape through monsoon rain, strong wind, and years of use.
Try this: Take a piece of cloth (a handkerchief or T-shirt) and pull it diagonally — corner to corner. It stretches easily. Now imagine if a third set of threads ran diagonally through the fabric, locking the other two in place. That is what the japi's triaxial weave does. Same idea is used in carbon fibre for racing cars and aircraft wings.
A prediction: If a japi weaver changed the crossing angle from 60° to 45°, the hat would be stiffer in some directions and flexible in others — it would warp unevenly. The 60° angle is not tradition for tradition's sake. It is the mathematically correct angle for equal strength everywhere.
Key idea: The japi's three-direction weave at 60° angles creates hexagons — a structure equally strong in all directions. The same principle is used in carbon fibre for aircraft and racing cars.
Access all 130+ lessons, quizzes, interactive tools, and offline activities
Hold a plain, round plate in front of you. Now close your eyes and ask a friend to rotate the plate. Open your eyes. Can you tell it was turned? **No*...
The japi is not flat like a frisbee. It is shaped like a **cone** — tall in the middle, sloping outward to a wide brim. This is not just style. It is ...