* Use compiled black as the pre-commit formatter
* ruff-format
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Keep GitHub Actions up to date with Dependabot
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added Lens formulae to the Physics repository
* Resolved the commented issues
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update lens_formulae.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Remove eval from arithmetic_analysis/newton_raphson.py
* Relocate contents of arithmetic_analysis/
Delete the arithmetic_analysis/ directory and relocate its files because
the purpose of the directory was always ill-defined. "Arithmetic
analysis" isn't a field of math, and the directory's files contained
algorithms for linear algebra, numerical analysis, and physics.
Relocated the directory's linear algebra algorithms to linear_algebra/,
its numerical analysis algorithms to a new subdirectory called
maths/numerical_analysis/, and its single physics algorithm to physics/.
* updating DIRECTORY.md
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* added the algorithm to compute the terminal velocity of an object falling in a fluid
* fixed spelling mistake
* fixed issues in topic description
* imported the value of g from scipy and changed the doctests accordingly
* fixed formatting
* Apply suggestions from code review
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* adding new physics algorithm: center of mass
* Add changes requested by the reviewer
* Add changes requested by the reviewer
* Update center_of_mass.py
* Update center_of_mass.py
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
* avg and mps speed formulae added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* avg and mps speed formulae added
* fixed_spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ws
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed
* changed name of file and added code improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* issues fixed due to pi
* requested changes added
* Created doppler_effect_of_sound.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated doppler_effect_of_sound.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added desc names
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* renamed doppler_effect_of_sound.py to doppler_frequency.py
* used expection handling rather than print statements
* fixed spacing for ruff
* Update doppler_frequency.py
This is super slick! Well done.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* avg and mps speed formulae added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* avg and mps speed formulae added
* fixed_spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ws
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed
* changed name of file and added code improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* issues fixed due to pi
* requested changes added
* added some doctests for exception handling, imported g from scipy and allowed zero gravity
* removed_scipy_import
* Update and rename archimedes_principle.py to archimedes_principle_of_buoyant_force.py
* Update archimedes_principle_of_buoyant_force.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* avg and mps speed formulae added
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* avg and mps speed formulae added
* fixed_spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* ws
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added amicable numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* spacing
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed
* changed name of file and added code improvements
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* issues fixed due to pi
* requested changes added
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* added the algorithm to compute Reynolds number
* fixed file name issue
* Apply suggestions from code review
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Python mirror_formulae.py is added to the repository
* Changes done after reading readme.md
* Changes for running doctest on all platforms
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change 2 for Doctests
* Changes for doctest 2
* updating DIRECTORY.md
* Doctest whitespace error rectification to mirror_formulae.py
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Python mirror_formulae.py is added to the repository
* Changes done after reading readme.md
* Changes for running doctest on all platforms
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Change 2 for Doctests
* Changes for doctest 2
* updating DIRECTORY.md
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Added Photoelectric effect equation
Photoelectric effect is one of the demonstration of quanta of energy.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed doctest
Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
* Update coulombs_law.py
distance is positive non zero real number (float type) hence corrected docs which says only integer.
* Update physics/coulombs_law.py
---------
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Create coulomb_law.py
* Update coulomb_law.py
* Update coulomb_law.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update and rename coulomb_law.py to coulombs_law.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update coulombs_law.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update coulombs_law.py
* Update coulombs_law.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update coulombs_law.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update coulombs_law.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Added functions to calculate temperature of an ideal gas and number of moles of an ideal gas
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/ideal_gas_law.py
Renamed function name
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Updated formatting
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Removed unnecessary parentheses
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update physics/ideal_gas_law.py
Removed unnecessary parentheses
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Update ideal_gas_law.py
Updated incorrect function calls moles of gas system doctests
* Update physics/ideal_gas_law.py
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
* Added file basic_orbital_capture
* updating DIRECTORY.md
* added second source
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fixed spelling errors
* accepted changes
* updating DIRECTORY.md
* corrected spelling error
* Added file basic_orbital_capture
* added second source
* fixed spelling errors
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* applied changes
* reviewed and checked file
* added doctest
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* removed redundant constnant
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added scipy imports
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* added doctests to capture_radii and scipy const
* fixed conflicts
* finalizing file. Added tests
* Update physics/basic_orbital_capture.py
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* pre-commit: Upgrade psf/black for stable style 2023
Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310
> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…
Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.
I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updating DIRECTORY.md
* Fix mypy errors in lorentz_transformation_four_vector.py
* Remove unused symbol vars
* Add function documentation and rewrite algorithm explanation
Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction
* updating DIRECTORY.md
* Update error message for speed
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Create centripetal_force.py
Centripetal force is the force acting on an object in curvilinear motion directed towards the axis of rotation or centre of curvature.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update centripetal_force.py
The value error should also handle negative values of the radius and using more descriptive names will be more beneficial for the users
* Update centripetal_force.py
Made some bug fixes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: SparshRastogi <75373475+SparshRastogi@users.noreply.github.com>
* Create potential_energy.py
Finding the gravitational potential energy of an object with reference to the earth, by taking its mass and height above the ground as input
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/potential_energy.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update physics/potential_energy.py
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/potential_energy.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Create malus_law.py
Finding the intensity of light transmitted through a polariser using Malus Law and by taking initial intensity and angle between polariser and axis as input
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update physics/malus_law.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/malus_law.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/malus_law.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update physics/malus_law.py
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Update malus_law.py
Made some changes in the error messages and the docstring testcases
* Update malus_law.py
Made changes for the passing the precommit
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
* Create kinetic_energy.py
Finding the kinetic energy of an object,by taking its mass and velocity as input
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update kinetic_energy.py
* Update kinetic_energy.py
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>