{{ message }}

Instantly share code, notes, and snippets.

# Stewart SchriefferStewSchrieff

Last active Jul 13, 2020
Riddler Classic July 10, 2020 (https://fivethirtyeight.com/features/can-you-make-24/)
View 01_Riddler_Stacking_Rings.md

# Riddler Clasic

### July 10, 2020

From Austin Shapiro comes a story of stacking that may stump you:

Mira has a toy with five rings of different diameters and a tapered column. Each ring has a “correct” position on the column, from the largest ring that fits snugly at the bottom to the smallest ring that fits snugly at the top.

Each ring she places will slide down to its correct position, if possible. Otherwise, it will rest on what was previously the topmost ring.

For example, if Mira stacks the smallest ring first, then she cannot stack any more rings on top. But if she stacks the second-smallest ring first, then she can stack any one of the remaining four rings above it, after which she cannot stack any more rings.

Created Apr 24, 2020
Simulation for Riddler Classic (https://fivethirtyeight.com/features/can-you-beat-the-goat-monty-hall-problem/)
View 01_output.txt
 stay_value 0.377298 switch_value 0.500682 dtype: float64
Last active Jan 14, 2020
Riddler (Find Your Favorite Song) 2019-12-06
View 1_probability.py
 def get_chance_of_better_than_next_on_next_roll(num): # this is a sliding scale return (42 - num - 1) / 100 def get_prob(num): if num == 41: return 0 prob = get_chance_of_better_than_next_on_next_roll(num) return prob + ((1 - prob) * get_prob(num +1))
Created Jan 7, 2020
Riddler_Express_Flag_Scramble
View 1_explanation.md

# Riddler Express

### https://fivethirtyeight.com/features/can-you-solve-the-vexing-vexillology/

Late night quick coding challenge. Read in all the pixels of the scrambled images, rudimentarily sort them, and then send them back out as images. This will give you a much better idea of what colors you are actually looking at, and can eyeball what the answers might be.

Code runs on both png and gif filetypes, so you can just download the images and go!

Created Dec 20, 2019
Riddler Express - Holiday Party (https://fivethirtyeight.com/features/can-you-find-a-matching-pair-of-socks/)
View 1_explanation.md

# Riddler Express

## https://fivethirtyeight.com/features/can-you-find-a-matching-pair-of-socks/

### Methodology

I've implemented a greedy algorithm that simulates every voter in the office being able to vote for any combination of options A, B, or C. By adding voters until the percentages are reached, we can find the least number of voters possible.

Last active Oct 1, 2019
Riddler League Baseball Simulation (https://fivethirtyeight.com/features/which-baseball-team-will-win-the-riddler-fall-classic/)
View simulate.py
 import numpy as np import matplotlib.pyplot as plt # Note that each inning is independent, so we only need to simulate one inning at a time moonwalkers = { 'name': "Mississippi Moonwalkers", 'color': 'blue',
You can’t perform that action at this time.