Project Euler 58 - Spiral Primes

Official link: https://projecteuler.net/problem=58

Thought Process

From Problem 28 we deduced the following

Knowing this, all I needed to do was keep track of how many entries I had and how many of them are prime. I did this using a standard while loop, and using my is_prime function

Interactive Code

Input a percentage(yourinput)

Code will output the length of the square such that the ratio of primes along both diagonals falls below yourinput