Skip to content

Instantly share code, notes, and snippets.

View chrismilson's full-sized avatar

Chris Milson-Tokunaga chrismilson

  • In Transit
View GitHub Profile
@chrismilson
chrismilson / Board.py
Last active July 10, 2020 05:55
MPMP10 - Avoid the Square
class Board:
def __init__(self, n):
self.n = n
self.tiles = [x[:] for x in [[' '] * n] * n]
def __getitem__(self, point):
return self.tiles[point.x][point.y]
def __setitem__(self, point, value):
self.tiles[point.x][point.y] = value
@chrismilson
chrismilson / PAPER_FOLDING.md
Last active June 12, 2020 08:24
Folding Puzzle

This puzzle is part of the Matt Parker's Maths Puzzles series.

Paper Folding

Given a piece of paper with eight marked out regions:

 _______________
| | | | |
@chrismilson
chrismilson / README.md
Last active February 3, 2021 00:22
Numbers to Words

Numbers to Words

demo

I am currently an English teacher at some schools in Japan and recently my students have been learning how to write the numbers in words in English. For example, if they were given the number 12 they are learning to write 'twelve'.

One of the questions I set the students was to find the number with the longest length (in characters; 4 would be bigger than 10 because four has more

@chrismilson
chrismilson / README.md
Last active May 19, 2020 03:57
Million Dollar Bank Prize - MPMP

This problem is from the series of Matt Parker's Maths Puzzles and the video

Million Pound Bank Prize

A bank is offering a promotion! Patrons are able to open an account and make a single deposit on the first and second days. Each day the account earns the previous day's balance in interest. The bank stipulates that if the account ever holds exaclty one million pounds then the account holder will be able to withdraw the one million pounds. In order to reduce risk the bank adds a clause

@chrismilson
chrismilson / README.md
Last active April 16, 2020 05:29
Matt Parker's Card Flip Game

This is based on Matt Parker's Youtube Video

Card Flip Game

The card flip game is played by two players.

The first player will place n (usually four) cards face down in a row and then flip some of the cards face up.

The second player will now attempt to flip individual cards in order to make all

@chrismilson
chrismilson / README.md
Last active April 11, 2020 01:06
Matt Parker's Maths Puzzles - 3 - Scrabble

Scrabble Puzzle

Problem:

In a game of Scrabble™, how many distinct sets of 7 tiles are worth 46 points?

This puzzle is the third of its kind from Matt Parker's Maths Puzzles.