Zeller Congruence (The Program)

This entry is part 3 of 13 in the series Zellers Algorithm

Now that we know that the algorithm works we can know build a solution We will start by adding code to perform the calculation for this we will need to import the Python math module so that we can use the built in floor function. We will also have to take into account the months …
Continue reading Zeller Congruence (The Program)

Collatz Conjecture (The Code)

This entry is part 2 of 2 in the series Collatz Conjecture

In the This program just returns the value for a single value so we need to wirte an extra function to get the sequence: The code above adds the values in the sequence to an array and then prints simply prints the array to the screen, running the code above produces the following output: This …
Continue reading Collatz Conjecture (The Code)