SAT Math Prep App
- 3 Devlogs
- 3 Total hours
App to study those annoying math questions :p
App to study those annoying math questions :p
Found and fixed the issue with this problem!! When b is the unknown, there are actually two possible x values (+ and -). The code was only listing ONE possible x value, and by extension, respectively, only one possible y value, as the solution. So when trying to input a solution, there was a 50/50 chance that I would put in a correct solution that was not recognized by the program.
To fix this, I’ve replaced the single number variable “solution” with a number array “solutions”, and now push each solution (even if just one) to the array; with that, I changed the checkAnswer() function from a one-time comparison to a for-of loop to iterate through all possible solutions and see if the user-provided answer is equivalent to any one.
If the randint() function has selected “b” to be the unknown:
This question type is now working. Time to move on to a different one!!
Finished what I call “problem type C”: a system of equations with one unknown constant– solution will be either the x or y coordinate of the point of intersection.
It seems to be working for the most part but there are times where the solution will be completely incorrect. I’ll have to pinpoint which iterations of the question give me that bug (next devlog will fix the bug hopefully)
Made the first kind of question! The app will generate completely randomly-generated (mathematically, not with AI) questions based off this question setup :p