From 4bdbe5a0140017dfdd35c4c343701074841d4158 Mon Sep 17 00:00:00 2001 From: deadvey Date: Sun, 26 Oct 2025 12:13:50 +0000 Subject: [PATCH] Added some physics and computer science questions --- .test.py.swp | Bin 0 -> 12288 bytes README.md | 5 +- docs/mathgenerator.html | 76 +- docs/mathgenerator/_gen_list.html | 32 +- docs/mathgenerator/_latexBuilder.html | 20 +- docs/mathgenerator/algebra.html | 1926 +++++++++---------- docs/mathgenerator/basic_math.html | 648 +++---- docs/mathgenerator/calculus.html | 380 ++-- docs/mathgenerator/computer_science.html | 1063 ++++++----- docs/mathgenerator/geometry.html | 2133 +++++++++++----------- docs/mathgenerator/misc.html | 1312 ++++++------- docs/mathgenerator/physics.html | 333 ++++ docs/mathgenerator/statistics.html | 56 +- docs/search.js | 2 +- mathgenerator/__init__.py | 1 + mathgenerator/_gen_list.py | 2 + mathgenerator/computer_science.py | 16 + mathgenerator/physics.py | 18 + 18 files changed, 4398 insertions(+), 3625 deletions(-) create mode 100644 .test.py.swp create mode 100644 docs/mathgenerator/physics.html create mode 100644 mathgenerator/physics.py diff --git a/.test.py.swp b/.test.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..78ed5553281abb796e2a5ba595ed2613d0cb720e GIT binary patch literal 12288 zcmYc?2=nw+u+%eTU|?Vn0O5Zbr?v?()bcShq@*UMl%-aJWbopg{N%)(jQrvfJuoXJ zKQ}Qm4~vdEsDb*<`6;RTxrrqi>8W|CMTsT(MfxSF#U*+Lgzds&?5NOa2#kgRp%5r7 zNz=99WiU1}Gyo}8R#H?D777J1NAYL~jE2By2#kinXb6mkz-S1JhQMeDjE2An34xLV zMuvI@1_mame>tEuBN`3mj#8r`Fd71*Aut*OqaiRF0;3@?8UmvsFd71*Aut*OqaiRF z0z)ta5>pr$B={K^0{B65{|pSU{{K^c28QeW3=G%!85nl(GcaWHGcaWFGcW|g)DA(v zjyicX1V%$(Gz3ONU^E0qLtr!nMnhmU1V%$(Gz3ONU^E0M34wy5%)Anf+;lyVArMYM zQGQZRYOan#aehu|NoIbYCIbV8n1ZcBZn|E2YF>O&Wqf9eMp0s3N`9^$hyodCpp%oD z2QoH2wIm*-DkrnJL_ [!WARNING] -> I (lukew3), am no longer interested in maintaining this project. If you have a use case for this project and have the abilities to grow it and ensure/improve it's quality, email me at lukew25073@gmail.com and I will consider adding you as a maintainer. Thanks! +Fork of
+Adding more Physics and Computer Science questions
A math problem generator, created for the purpose of giving teachers and students the means to easily get access to random math exercises to suit their needs. diff --git a/docs/mathgenerator.html b/docs/mathgenerator.html index b18934d..bf8f4cd 100644 --- a/docs/mathgenerator.html +++ b/docs/mathgenerator.html @@ -3,14 +3,14 @@ - + mathgenerator API documentation - - + + - - - - - - - - - + + + + + +
+
+

+mathgenerator.physics

+ + + + + + +
 1import random
+ 2import math
+ 3
+ 4def kinetic_energy(max_mass=1000, max_vel=100):
+ 5   r"""Kinetic Energy calculation using Ek = 0.5 * m * v^2
+ 6
+ 7    | Ex. Problem | Ex. Solution |
+ 8    | --- | --- |
+ 9    | What is the kinetic energy of an object of mass $5 kg$ and velocity $10 m/s$ | $250 J$ |
+10    """
+11   velocity = round(random.uniform(1, max_vel),2)
+12   mass = round(random.uniform(1, max_mass),2)
+13   kinetic_energy = round((0.5 * mass * velocity**2), 2)
+14
+15
+16   problem = f"What is the kinetic energy of an object of mass ${mass} kg$ and velocity ${velocity} m/s$?"
+17   solution = f'${kinetic_energy} J$'
+18   return problem, solution
+
+ + +
+
+ +
+ + def + kinetic_energy(max_mass=1000, max_vel=100): + + + +
+ +
 5def kinetic_energy(max_mass=1000, max_vel=100):
+ 6   r"""Kinetic Energy calculation using Ek = 0.5 * m * v^2
+ 7
+ 8    | Ex. Problem | Ex. Solution |
+ 9    | --- | --- |
+10    | What is the kinetic energy of an object of mass $5 kg$ and velocity $10 m/s$ | $250 J$ |
+11    """
+12   velocity = round(random.uniform(1, max_vel),2)
+13   mass = round(random.uniform(1, max_mass),2)
+14   kinetic_energy = round((0.5 * mass * velocity**2), 2)
+15
+16
+17   problem = f"What is the kinetic energy of an object of mass ${mass} kg$ and velocity ${velocity} m/s$?"
+18   solution = f'${kinetic_energy} J$'
+19   return problem, solution
+
+ + +

Kinetic Energy calculation using Ek = 0.5 * m * v^2

+ + + + + + + + + + + + + + +
Ex. ProblemEx. Solution
What is the kinetic energy of an object of mass $5 kg$ and velocity $10 m/s$$250 J$
+
+ + +
+
+ + \ No newline at end of file diff --git a/docs/mathgenerator/statistics.html b/docs/mathgenerator/statistics.html index d8840c1..0a77d8e 100644 --- a/docs/mathgenerator/statistics.html +++ b/docs/mathgenerator/statistics.html @@ -3,14 +3,14 @@ - + mathgenerator.statistics API documentation - - + + -