Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions Fifty Fizzbuzzes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 3: Conserving Modulus\n",
"# fizz: Conserving Modulus\n",
"\n",
"There's something I don't like about testing the divisibility more than once. There's only two variables here. \n",
"\n",
Expand Down Expand Up @@ -112,7 +112,7 @@
"source": [
"The line is a bit long though. \n",
"\n",
"# 5: Least Common Multiple\n",
"# buzz: Least Common Multiple\n",
"\n",
"The fizz/buzz pattern is only 15 things long. Why should we do all this tricky modulusing when the computer could save some trouble and just loop through the pattern?"
]
Expand All @@ -135,7 +135,7 @@
"source": [
"Sure it doesn't stop right at 100, but it's good enough for me.\n",
"\n",
"# 6: Just Print It\n",
"# fizz: Just Print It\n",
"\n",
"Actually, if you really want the fastest running code I don't see why you wouldn't just do this:"
]
Expand Down Expand Up @@ -217,7 +217,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 9: Multiple Refinements of a List\n",
"# fizz: Multiple Refinements of a List\n",
"\n",
"Well, if we're going to do a list, I've got a better way. Let's start from scratch this time.\n",
"\n",
Expand Down Expand Up @@ -248,7 +248,7 @@
"source": [
"As you can see, the order of operations matters. But what if we wanted to start with fizzbuzzes?\n",
"\n",
"# 10: Conservation of Fizzbuzz\n",
"# buzz: Conservation of Fizzbuzz\n",
"\n",
"We'll start with a list of \"fizzbuzz\", and we want to conserve the letters.\n",
"\n",
Expand Down Expand Up @@ -330,7 +330,7 @@
"source": [
"It's fun to try avoiding certain functions or syntax. \n",
"\n",
"# 12: No Mods Allowed\n",
"# fizz: No Mods Allowed\n",
"\n",
"When I first heard this problem (which is apparently common in coding interviews? I dunno I've never done one), I knew I'd want to use % if it were in the languages I know, but I was just learning python and could only guess as to whether % is mod like I'm used to.\n",
"\n",
Expand Down Expand Up @@ -415,7 +415,7 @@
"source": [
"Yes, I do like that better! \n",
"\n",
"# 15: Too Many Functions\n",
"# fizzbuzz: Too Many Functions\n",
"\n",
"Let's add more functions! Let's get weird!"
]
Expand Down Expand Up @@ -555,7 +555,7 @@
"\n",
"Not bad, not bad.\n",
"\n",
"# 18: Fizzbuzz Game with Judginess\n",
"# fizz: Fizzbuzz Game with Judginess\n",
"\n",
"Now, maybe we could make the game more fun while also increasing accuracy if we compare the new fizzbuzz list we're creating to a known good list. Does it count? Sure."
]
Expand Down Expand Up @@ -749,7 +749,7 @@
"source": [
"So it's not 100% accurate. So sue me.\n",
"\n",
"# 21: Random Guesses\n",
"# fizz: Random Guesses\n",
"\n",
"Let's just take a random guess for each. Who will be able to tell the difference, really?"
]
Expand Down Expand Up @@ -926,7 +926,7 @@
"source": [
"Yesss, yes, there we go.\n",
"\n",
"# 24: Simple Answer\n",
"# fizz: Simple Answer\n",
"\n",
"Let's step back a moment. Really fizzbuzz should be this nice simple answer, regardless of whether it's this strange concept called \"correct\"."
]
Expand All @@ -944,7 +944,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 25: BUZZY FIZZY BUZZ BUZZ FIZZ BUZZ"
"# buzz: BUZZY FIZZY BUZZ BUZZ FIZZ BUZZ"
]
},
{
Expand Down Expand Up @@ -977,7 +977,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 27: Mod Mod Mod Mod Mod\n",
"# fizz: Mod Mod Mod Mod Mod\n",
"\n",
"This one's actually correct:"
]
Expand Down Expand Up @@ -1053,7 +1053,7 @@
"source": [
"It is not making the noises though, so I don't know if I'm doing it wrong or if this computer or jupyter notebooks doesn't do it? Hmm! Also I imagine to the human ear it is all happening at once.\n",
"\n",
"# 30: Auralization\n",
"# fizzbuzz: Auralization\n",
"\n",
"Let's look up how to play stuff with timing, and making different tones!\n",
"\n",
Expand Down Expand Up @@ -1249,7 +1249,7 @@
"source": [
"Yes, that's more like it!\n",
"\n",
"# 33: RGBuzz\n",
"# fizz: RGBuzz\n",
"\n",
"Well, I don't know how to do much in the way of graphics, but I know how to plot graphs. So let's use a bar graph to represent fizzbuzz in color."
]
Expand Down Expand Up @@ -1314,7 +1314,7 @@
"source": [
"Not bad. I'd like that in a block please.\n",
"\n",
"# 35: Color Fuzz Block\n",
"# buzz: Color Fuzz Block\n",
"\n",
"Let's add some more and put them all close together for color time. I'm also going to have two shades of blue for numbers so that when they're together they don't blend together."
]
Expand Down Expand Up @@ -1347,7 +1347,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 35: Time to learn to draw Rectangles?"
"# fizz: Time to learn to draw Rectangles?"
]
},
{
Expand Down Expand Up @@ -1403,7 +1403,7 @@
"source": [
"Yep, it's rectangles, we win.\n",
"\n",
"# 36: User Set Fizz Fuzz\n",
"# 37: User Set Fizz Fuzz\n",
"\n",
"Why always 5 and 3? Why fizz and buzz? Let's let the user decide what numbers are special and what we call them.\n",
"\n",
Expand Down Expand Up @@ -1546,7 +1546,7 @@
"source": [
"ah, so classy!\n",
"\n",
"# 39: Fizz Bizz Wuzz\n",
"# fizz: Fizz Bizz Wuzz\n",
"\n",
"Why just two numbers? Let's allow any number of special multiples."
]
Expand Down Expand Up @@ -1629,7 +1629,7 @@
"source": [
"Let's take this poem thing to the next level.\n",
"\n",
"# 40: Fizz Poem Friend\n",
"# buzz: Fizz Poem Friend\n",
"\n",
"Let's make a poem bot that bases its fizz-style poem off of user input."
]
Expand Down Expand Up @@ -1738,7 +1738,7 @@
"source": [
"(Note that the above does not find prime numbers, and the single numbers aren't necessarily prime, they just don't have named factors.)\n",
"\n",
"# 42: Froodbeeb\n",
"# fizz: Froodbeeb\n",
"\n"
]
},
Expand Down Expand Up @@ -1907,7 +1907,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 45: Sets\n",
"# fizzbuzz: Sets\n",
"\n",
"Let's use some set operations! I want to ampersand something!"
]
Expand Down Expand Up @@ -2036,7 +2036,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 48: Text Adventure with Sound"
"# fizz: Text Adventure with Sound"
]
},
{
Expand Down Expand Up @@ -2416,7 +2416,7 @@
"\n",
"Ok, it is finally time for:\n",
"\n",
"# 50: The Fizzbuzz To End All Fizzbuzzes"
"# buzz: The Fizzbuzz To End All Fizzbuzzes"
]
},
{
Expand Down