Why do politicians act the way they do? This is the simple question (with a somewhat lengthier answer) that Bruce Bueno de Mesquita and Alastair Smith attempt to answer in The Dictator’s Handbook. Aimed at anyone who is interested in understanding the logic behind political decisions, the authors take a common sense approach in explaining …
Month: August 2018
Fibonacci Sequence & Pascal’s Triangle | <em>Bad Code</em> [2]
Two short pieces of code – one for generating the first n terms of the Fibonacci Sequence, the other for generating the first n rows of Pascal’s Triangle. #Function to generate the Fibonacci sequence to the nth term index = int(input(“Please enter the number of terms in the Fibonacci sequence to display:\n”)) …