Skip to content

A simple mathematical expressions maker and solver

Notifications You must be signed in to change notification settings

leobel96/MathExpress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

MathExpress

Why?

Yesterday I have seen on the internet a simple mathematical exercise:

Write an expression which respects the following requirements:

  • Must appear only sum, subtraction and multiplication
  • Must appear numbers 2, 4, 5, 10, 12 only once
  • Result must be 22

Initially I have tried to resolve it by hand with a "trial and error" approach, then I have decided to write a simple and dumb python script. It consists of two parts: the first one generates all the possible expressions which respect the first 2 requirements, the second one solves the generated expressions to check if they also respect the third requirement.

About

A simple mathematical expressions maker and solver

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages