How to program a slot machine

broken image

Jackpot! Number of spins to hit the jackpot: 562 Number of two of a kinds hit: 82 The Basics of Functional ProgrammingĪccording to Wikipedia, “Functional programming is a programming paradigm where programs are constructed by applying and composing functions. When the program is run, the output looks like this:

broken image

You can view the full gist here, but I’ll also explain some of the logic used when developing from a functional perspective.

broken image

Since this involves Python, as a way to brush up on my Python I decided to build a simple, single reel slot machine using a functional programming paradigm.

broken image

Recently I’ve been helping a friend with some Flask apps.

broken image