Now, for the fourth activity in the Elementary part of the programming course – we had to try out using Flexible Variables. One of which was a simple True/False program, the other is the famous “FizzBuzz”-program.

This is the simple True/False-program:

AS04_2

I should have made the program more complex with a better return print statement, but this was what was in the specified activity task – so I went on to the more exciting FizzBuzz-program.

If you never heard of the FizzBuzz-program, it is commenly used as a test given to programmers when applying for a job. They are then being asked to write a program that will either give you a Fizz, a Buzz or a FizzBuzz in a print return when entering a positive integer that can be divided by 3 or 5 or both. For example, when entering 9 you get a Fizz, if you enter 10 you get Buzz, but if you enter 15 you will get a FizzBuzz. Also its important to have an else statement that gives you another try if you were to enter an incorrect value.

AS04_1