Coder Social home page Coder Social logo

mathp's Introduction

mathp

Math problem generation.

Install

Prerequisites:

git clone https://github.com/vikramdurai/mathp
cd mathp
go install

API Calls and Parameters

  • /api/: the API endpoint. Uses the following parameters:

    Parameter Sample Values Type
    Grade 5,3,6 int
    Syllabus NCERT,CBSE string
    Mode Algebra,Geometry string
    Pattern polynomial,lineq string
    Amount 3,4,7,9 int

    Currently we only use Pattern and Amount, so feel free to omit the others in the url for the time being.

    Usage:

    GET /api/?pattern=<pattern>&amount=<amount>
    

    For example:

    GET /api/?pattern=polynomial&amount=2
    

    returns a JSON-encoded reply containing two polynomials.

    A typical result:

    {
        "request": {
            "pattern": "polynomial",
            "amount": 2,
        },
        "reply": [
            "3x + -4y",
            "4a² - 2bc²a",
        ]
    }
    
  • /api/pdf: the API endpoint that generates PDFs. No parameters, delivers raw application/pdf. I may add some customization options later. Output of this endpoint looks something like this: image of PDF generated by mathp

mathp's People

Contributors

vikramdurai avatar

Watchers

 avatar  avatar

mathp's Issues

More question types

Examples (will edit as I think of more):

  • Algebraic expressions
  • Word problems
  • Percentage questions

More features for the PDF gen

We can add more options to PDF gen:

  • two options, "workbook" and "exam". Workbook gives easy questions with an answer page, exam gives slightly harder questions with no answers given.
  • Option-style answering should also be implemented.

Some terms are completely blank

I've made a temporary solution, in lines 55-57 in the main.go file (the formatTerm function):

if answer == "" {
		t.Degree += 1
		return t.formatTerm()
}

I think that fixed it, I'll need to do the tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.