AP Calculator banner

AP Calculator

3 devlogs
10h 19m 6s

It’s a calculator for various expressions of Arithmetic Progression specially designed to aid students in various types of expressions given in questions.

This project uses AI

Used Co-pilot for code debugging and Gemini 3.1 Pro for README.md generation.
Also used Gemini 3.1 Pro for formula generation for categorised problem types.

Demo Repository

Loading README...

adityarajmalviyaa

Following up on that first sprint! The basic formula a_n = a + (n-1)d only gets you so far. I finally had to sit down and tackle the actual “tough” questions from RS Aggarwal and RD Sharma—the ones designed to twist your brain in exams.
My goal for this session was to make the calculator capable of solving the hardest categories I mapped out previously.

  1. Upgraded the UI so the student can select the exact “Archetype” of the problem they are looking at.
  2. System of two equations: I built backend logic to isolate d mathematically using (v1 - v2) / (n1 - n2).
  3. Symmetric Selection: I hardcoded a symmetric assumption: (x-d), x, (x+d). It instantly finds the middle term and solves the rest. The math is not worth the time, it just get messy anyhow in the end with a, a+d and a+2d.
  4. Divisibility Problems: automatically calculates the first and last valid numbers within the range so you don’t have to figure it out manually.

But I do think that there is a lot more we can do.

Also, when testing a massive range (like 1 to 10,000), Chart.js tried to draw thousands of points and almost fried my browser tab. I added a server-side cap to only plot the first 50 terms visually, while keeping the background numerical calculations 100% accurate.

Changelogs concerned—

  1. Implement mode selector and update styles ‘https://github.com/adibuddies/apsolver/commit/ef77438af4c844e66cc80fe46f208eeffd3f5220
  2. Refactor solve_ap function to support new modes ‘https://github.com/adibuddies/apsolver/commit/e8983095edfa49ae6b78e87a583e5b36ccc6d549
  3. Implement input fields for two terms ‘https://github.com/adibuddies/apsolver/commit/78a2b152b35c505060eca68e47a7ea6c5def3e8e
  4. Refactor mode selector and update UI elements ‘https://github.com/adibuddies/apsolver/commit/47cc6fb6829adb487ac6429e8b9a2d688d520b49
  5. Refactor solve_ap function for 4 types of arithmetic progressions questions ‘https://github.com/adibuddies/apsolver/commit/9136834a730de64ff449ecde23cc88ee3bf6c99f

(PS - Just like the last devlog, you’ll see these commits were pushed in rapid succession today. Still doing that retroactive upload from my local serial files to get everything synced up for Flavortown before I collapse into bed! I have been working non-stop from 5 to 10:30 now in the morning. And I slept just 4 hours before that.)

Project complete. It can basically solve the entire AP chapter now

Also, please don’t mind the first photo, it’s a google download, I don’t know how to delete it.

Attachment
Attachment
Attachment
Attachment
Attachment
0
adityarajmalviyaa

My goal is to make an interactive and attractive place where students can solve all those difficult problems of Arithmetic Progression (and though not part of this project but a sequel goal- geometric progressions). AP questions have not certainly been tough but as like any other topic in mathematics, there are a few that are made to twist you…
So here’s my help.

I read through my old RS (and my friend’s RD) as well as a few question papers and categorised the types of questions based on-

  1. What information is given,
  2. What are we expected to find out from that.

I have to generalise each category to a specific one works all formula.

For now a basic html (but yeah impressively beautiful, and I must appreciate myself, I have made a lot of good css across all the projects here at Flavortown), is ready with a app.py that does with a basic formula-
a_n = a + (n-1)d
and s_n = (n/2)
{2a + (n-1)*d}

It is able to plot basic graphs.

Changelogs concerned—

  1. README.md ‘https://github.com/adibuddies/apsolver/commit/227c35dfdf83656da5059805e54be5cd251a29fe
  2. App.py (basic calculations using formulae) ‘https://github.com/adibuddies/apsolver/commit/11f1ebaa62f66e36f25481a7607bfb23388348a0
  3. Index.html added with Chart.js for plotting graph ‘https://github.com/adibuddies/apsolver/commit/9f80907fcb7e5332ed3c17190093f6ec1a8430ae

PS. You may find that the github commits are very close to each other, that is because I made this project 15-20 days ago as well as the Devlog with a very simple small message I had posted- “This is my first devlog, it’s quite early in the morning and I’m feeling like I drop any second. Will update it later…”
I didn’t have time to do GitHub and live site and all that day, I think I woke up till 5 AM for when I was already not getting enough sleep from academic load. So I just kept on making new serial order files for every change and now I have uploaded it in that order for Flavortown. Please don’t mind!

Attachment
Attachment
Attachment
0