Problem 1 in Python

Solves the problem by creating a function with a for loop that runs
through a given number of times