DEV Community

Cover image for πŸŒ‹ The Biggest Earthquake on necoz! 🐱 Python operator
Sᴛᴀʀ⭐ for Necoz

Posted on

πŸŒ‹ The Biggest Earthquake on necoz! 🐱 Python operator

🐱 Chapter 1: A Normal Day on necoz

It was a beautiful morning on necoz.

Thirty cats were enjoying their royal fish party. Some were dancing, some were sleeping, and one cat was trying to eat the invitation card. πŸ’€

King was relaxing on his royal throne.

King: "What a peaceful day! I love my kingdom."

Suddenly...

BOOOOOOOOOOOOOOM! πŸŒ‹πŸ’₯

The entire planet started shaking!

Cats were flying everywhere. One landed inside a fish bucket, another crashed into a UFO, and one cat was still sleeping like nothing had happened.

King: "WHAT IS HAPPENING?! WHO IS SHAKING MY KINGDOM?!"

A little robot rushed into the palace.

Robot: "Your Majesty! It's an earthquake! We need to calculate our emergency supplies!"

King: "FIRST SAVE MY FISH! THEN SAVE THE PLANET!"

🐟 Chapter 2: The Great Fish Calculation

The robot opened its laptop.

Robot: "We have 30 cats, and every cat needs 5 fish. Let's calculate how many fish we need."

cats = 30
fish_per_cat = 5

total_fish = cats * fish_per_cat

print(total_fish)
Enter fullscreen mode Exit fullscreen mode

Output:

150
Enter fullscreen mode Exit fullscreen mode

Robot: "We need 150 fish!"

King: "150?! ARE WE FEEDING CATS OR OPENING A FISH FACTORY?!"

The robot explained that * is a multiplication operator.

Then King asked:

"What if we find another 50 fish?"

fish = 150
extra_fish = 50

print(fish + extra_fish)
Enter fullscreen mode Exit fullscreen mode

Output:

200
Enter fullscreen mode Exit fullscreen mode

King: "PERFECT! NOW I CAN RETIRE AS A FISH BUSINESSMAN!" πŸ˜‚

πŸ›Έ Chapter 3: The UFO Invasion

Suddenly, a mysterious UFO appeared above the palace.

Inside were 10 alien cats.

They wanted to join the royal party, but the security robot needed to check their fish supply.

alien_fish = 500

print(alien_fish > 100)
print(alien_fish < 100)
print(alien_fish == 100)
print(alien_fish != 100)
Enter fullscreen mode Exit fullscreen mode

Output:

True
False
False
True
Enter fullscreen mode Exit fullscreen mode

Robot: "These are Comparison Operators. They compare two values and return True or False."

King: "So Python can judge people?"

Robot: "It judges values, Your Majesty."

King: "Finally! Someone who understands my royal responsibilities!"

πŸ€– Chapter 4: The Cat Security System

The alien cats wanted to enter the palace.

But King had two rules:

  • Every cat needs a royal invitation.
  • Every cat needs a security pass.

The robot wrote:

invitation = True
security_pass = True

print(invitation and security_pass)
Enter fullscreen mode Exit fullscreen mode

Output:

True
Enter fullscreen mode Exit fullscreen mode

Robot: "Both conditions are True, so the gate opens!"

King: "EXCELLENT! LET THE CATS IN!"

Robot also explained:

  • and β€” Both conditions must be True.
  • or β€” At least one condition must be True.
  • not β€” Reverses True and False.

King: "This is getting complicated. I only wanted to eat fish."

πŸŒ‹ Chapter 5: The Second Earthquake!

Just when everyone thought the disaster was over...

BOOOOOOOOM!

Another earthquake!

The robot checked the emergency fish supply.

fish = 100

fish += 50

print(fish)
Enter fullscreen mode Exit fullscreen mode

Output:

150
Enter fullscreen mode Exit fullscreen mode

Robot: "+= increases the existing value by adding another value."

King: "Wonderful! Give me 150 fish!"

Robot: "Your Majesty, those are numbers."

King: "I KNOW! I CAN READ!"

Suddenly, a tiny cat entered the control room.

It pressed a giant red button.

BEEEEEEEEEP! 🚨

Robot: "WARNING! ANOTHER EARTHQUAKE!"

King: "WHO LET THAT CAT INTO THE CONTROL ROOM?!"

Cat: "Meow."

King: "I AM MOVING TO ANOTHER PLANET!" 😭

Top comments (7)

Collapse
 
nyaomaru profile image
nyaomaru Necoz •

This was a really fun way to learn the basics of Python operators! πŸ˜ΈπŸ™Œ

The storytelling makes multiplication, comparisons, logical operators, and += much easier to remember.

But a planet with this many earthquakes sounds terrifying. πŸ˜ΉπŸŒ‹

Let’s move to another planet next time!

I’m already curious about what happens in the next chapter. πŸ‘€

Developers only need three things:

  • Dance πŸ’ƒ
  • Eat πŸ•
  • (V)Fish 🐟
Comment on What does DEV stand for?
nyaomaru
nyaomaru Nov 16

Dance, Eat, Vim. πŸ’ƒπŸ•πŸ’»

The three essentials of a developer's life. 😹

Collapse
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

Thanks for the support πŸ₯°

Collapse
 
mestonecold profile image
Shruti Shahi Necoz •

and that's DEV for you hahaπŸ™ŒπŸ»πŸ˜Ί

Collapse
 
effessdev profile image
EffessDev Necoz •

Wow! What about making this a series? πŸ™ƒ

Collapse
 
star123 profile image
Sᴛᴀʀ⭐ Necoz •

It is not special enough to be made into a series.πŸ˜€

Collapse
 
effessdev profile image
EffessDev Necoz •

What? Who said that? It IS special! πŸ’Ž

Collapse
 
mestonecold profile image
Shruti Shahi Necoz •

Oh i want these bedtime story series, make it!πŸ™ŒπŸ»πŸ˜Ί