365 Days of Python: Day #63 — Crazy Cubes

Rick Deckard
2 min readJan 18, 2023

The Rubik’s Cube was invented in 1974 by Ernő Rubik. And since then, it has remained a staple as both a childhood toy and a competitive tool.

Day #63 (1/16/2023)

“If you are curious, you’ll find the puzzles around you. If you are determined, you will solve them.”

— Ernő Rubik

Accomplishments

  • Added a clear() function to my PotW (see below)
def clear():
if os.name == "posix":
os.system("clear")
else:
os.system("cls")
  • Added a user_shake_again() function to my PotW (see below)
def user_shake_again():
shake_again = input("\nWould you like to shake the Magic 8-Ball again? (Y/N)\n").upper()

if shake_again == "Y":
magic_8_ball_result()
elif shake_again == "N":
clear()
exit()
else:
print("ERROR: INVALID RESPONSE")
user_shake_again()
  • Tested and debugged my PotW
  • Uploaded my PotW to GitHub

Weekly Goals

  • Write a program that simulates a Magic 8-Ball (100%)

Closing Thoughts

I learned to solve the Rubik’s Cube in the 6th grade. And for the last decade or so, I have gone through phases of forgetting and relearning the algorithms required to solve it.

I used to care about how fast that I could solve it. Nowadays, I care more about the fact that I can solve it.

Do not get me wrong. There are definitely times when I completely mess up the algorithms and have to restart the (sometimes) painstaking process.

At its core, though, solving the Rubik’s Cube is a mental exercise for me.

--

--