Solving Fizz Buzz with Cosines
Fizz Buzz with Cosines By Susam Pal on 20 Nov 2025 Fizz Buzz is a counting game that has become oddly popular in the world of computer programming as a simple test of basic programming skills. The rules of the game are straightforward. Players say the numbers aloud in order beginning with one. Whenever a number is divisible by 3, they say ‘Fizz’ instead. If it is divisible by 5, they say ‘Buzz’. If it is divisible by both 3 and 5, the player says both ‘Fizz’ and ‘Buzz’. Here is a typical Python program that prints this sequence: for n in range(1, 101): if n % 15 == 0: print(‘FizzBuzz’) elif n % 3 == 0: print(‘Fizz’) elif n % 5 == 0: print(‘Buzz’) else: print(n) Here is the output: fizz-buzz.txt. Can we make the program more complicated? Perhaps we can use trigonometric functions to…