diff --git a/.test.py.swp b/.test.py.swp new file mode 100644 index 0000000..78ed555 Binary files /dev/null and b/.test.py.swp differ diff --git a/README.md b/README.md index 1a0d7db..bf7d71e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # mathgenerator - -> [!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 - - + + -