New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

math-exercises

Package Overview
Dependencies
Maintainers
1
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

math-exercises

Générateurs d'exercices et questions mathématiques en latex

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
830
increased by9.5%
Maintainers
1
Weekly downloads
 
Created
Source

math-exercises

This is a generator of Math exercises for middle school and high school.

So far, exercises are written in French, but any translation is welcome !

This library is used by Mathlive.fr for collaborative quizzes.

🚧 Work in progress !

This library is still in beta and the architecture may very well completely change in the future.

Incoming improvements :

  • Random images generation using tikZ

  • Steps within answers

  • Coverage of all topics up to 12th grade

  • Better classification of exercises

Exercises format

Each exercise has a generator that will return distinct questions for this exercises.

The Question in itself has an instruction, a startStatement and an answer (which are all tex strings).

How to use

Example with (ax+b)^2 questions :

import { firstIdentity } from exercises/calculLitteral/distributivity/firstIdentity

console.log(firstIdentity.instruction);
const question = firstIdentity.generator(1)
console.log(question.startStatement)
console.log(question.answer)

//output : 
// Développer et réduire : 
// (2x+3)^2
// 4x^2 + 12x + 9

Beware, some exercises do not have instructions, because the instruction is directly in the question itself.

Expression tree and latex parser

Math expressions are implemented via a tree of Nodes that you'll find inside tree/nodes.

The latexParser function will parse the tree into a TeX string that is using a valid mathemtical syntax.

Minimal dependencies

We're trying to keep to our dependencies to a minimum. So far we're only using mathjs as an external library, to evaluate and simplify expression trees. We would love to have our own way of simplifying expressions in the future.

How to contribute

Any contribution is welcomed.

There are a ton of exercises left to implement !

FAQs

Package last updated on 10 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc