euler Module

This is the main module for Project Euler, it provides some high-level functionality via a command-line application.

By starting a new problem, its description will be downloaded into a skeleton Python module which conforms to the API used in this project; the module will be placed at solutions/ for problem X. You must provide a function solve() which computes and returns the answer. Once you have successfully submitted the correct answer to the Project Euler website you should save that answer into the expected_answer member. This will be used to check the ongoing correctness of your solution.

While developing and testing your solution, you’ll want to run your code. To compute the answer to problem X using your solution you would exercise the solve function.


both start and solve commands take an optional problem identifier; if this is not provided, you will be prompted for one on the standard input.

Finally, you may want to [re-]validate all solutions (to check you haven’t broken anything) via the validate function.

Program Synopsis

usage: [-h] {start,solve,validate} ...

Positional Arguments

command Possible choices: start, solve, validate



Start a new Project Euler problem start [-h] [n]
Positional Arguments
n problem number (default: prompt user for input)


Compute the answer to a single Project Euler problem solve [-h] [n]
Positional Arguments
n problem number (default: prompt user for input)


Compute answers to all Project Euler problems validate [-h]

euler – Command Line Interface


Main program entry point


Dynamically load and run solution for a selected Project Euler problem


Create a template solution Python file for a selected Project Euler problem

The Python file will be populated by the problem description and boilerplate needed by this project.