Finxter Easter Egg – Can You Solve This Python Puzzle? : Chris

Finxter Easter Egg – Can You Solve This Python Puzzle?
by: Chris
blow post content copied from  Be on the Right Side of Change
click here to view original post


Rate this post

🥚 Let the Easter egg-citement begin! Guess the magic hop count – what’s the output of this code snippet?

# Easter Bunny Hop Puzzle: Guess the final hop count to find the promo code!

def bunny_hop(eggs):
    hops = 0
    for i in range(len(eggs) - 1):
        if eggs[i] < eggs[i + 1]:
            hops += 1
        elif eggs[i] > eggs[i + 1]:
            hops -= 1
    return hops

# Easter eggs pattern
eggs = [2, 3, 5, 1, 5, 7, 1]

# Calculate bunny hops
final_hops = bunny_hop(eggs)

# Reveal the promo code
promo_code = "EASTER" + str(final_hops)
print("The Easter Promo Code is:", promo_code)

The output of this code snippet is also the discount code of our special easter promo (20% OFF) for the Finxter Premium Membership. Just type in the promo code. This code expires after easter — you can test if it still works here:

PS: Somewhere on this page I have hidden another easter egg that reveals a discount code that is too crazy for our accounting department to handle. Don’t tell them. 🤫


March 29, 2024 at 02:34PM
Click here for more details...

=============================
The original post is available in Be on the Right Side of Change by Chris
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Salesforce