BirthDay Cake Activity
What is it?
This cake is unique because it uses binary candles to show the age. Binary is computer language that is only written in zeros and ones. These zeros and ones represent off and on switches. Here, the candles have states; unlit and lit. If you represented the lit candle as 1 then you could light the candles to represent an age. This is exactly what happens in this project. It first begins by asking, "how old are you." Numeral answers will be stored for future use. If the answer has letters or words, the user will have to restart the program. As the cake only has 7 candles meaning that there is 128 total unique combinations for the candles. With the age, the program then converts the number to binary. The code then lights the candles according the binary code. For example the first candle, Violet, has the number 1 it will light up. It will then start more code to light the next candle, Indigo. The code continues until all candles have been compared for lighting.