top of page


Finding the Largest Product in a Series: Project Euler Problem 8
Project Euler Problem 8 asks us to find the thirteen adjacent digits in a 1000-digit number that have the greatest product. It's a straightforward problem that tests our ability to work with strings, iteration, and basic arithmetic operations. The Problem Given a 1000-digit number, we need to: Extract every possible sequence of 13 consecutive digits Calculate the product of each sequence Return the maximum product found The Solution Here's my Python solution: python products
Jan 72 min read


Finding the Longest Prime-Generating Quadratic: Project Euler Problem 27
Project Euler Problem 27 asks us to find coefficients a and b for the quadratic expression n² + an + b that produces the maximum number of consecutive primes for n = 0, 1, 2, ... The Problem Euler discovered the remarkable quadratic formula n² + n + 41, which produces 40 primes for consecutive integer values starting from n = 0. The challenge is to find the product of coefficients a and b for the quadratic that produces the maximum number of primes, with -1000 < a < 1000
Dec 15, 20253 min read


Python Word Order - Another Hacker Rank Solution
Consider the following problem. You are given a number of words to read into your python program. The output needs to have on the first...
Aug 29, 20252 min read


HackerRank - The Minion Game Solution
Kevin and Stuart want to play the ' The Minion Game '. Game Rules Both players are given the same string, Both players have to make...
Apr 27, 20252 min read


Swap Case in Python - Hacker Rank Challenge to Write a Function that swaps the case of all letters in a string
Suppose you were given a string that was equal to: Hello - Welcome To The Python Community but you needed it to return: hELLO - wELCOME...
Apr 23, 20251 min read


Python HackerRank! Find the Runner-Up Score - AKA Finding the second largest number in an array, list or tuple.
Given the participants' score sheet for your University Sports Day, you are required to find the runner-up score. You are given scores....
Apr 18, 20251 min read


Project Euler Problems 1 & 2: Multiples of 3 and 5 //Even Fibonacci Numbers
Project Euler is a series of mathematical questions that need the accompaniment of computer programming to solve. It is permissible to share the solution to the first 100 questions but none thereafter. The first question asks for the sum of the numbers which are divisible by 3 or 5 under 1000. The code solution is here (in python): list_x = list(range(1,1000)) list_new = [] #print(list_x) for integer in list_x: if integer % 5 == 0 or integer % 3 == 0: list_new.append(inte
Jan 1, 20251 min read
bottom of page