Fix sphinx/build_docs warnings for physics/newtons_second_law_of_motion (#12480)

* Fix sphinx/build_docs warnings for physics/newtons_second_law_of_motion

* Fix

* Fix

* Fix review issue
This commit is contained in:
Maxim Smolskiy 2024-12-29 18:41:28 +03:00 committed by GitHub
parent d9092d88dd
commit bfc804a41c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,18 +1,22 @@
""" r"""
Description: Description:
Newton's second law of motion pertains to the behavior of objects for which Newton's second law of motion pertains to the behavior of objects for which
all existing forces are not balanced. all existing forces are not balanced.
The second law states that the acceleration of an object is dependent upon two variables The second law states that the acceleration of an object is dependent upon
- the net force acting upon the object and the mass of the object. two variables - the net force acting upon the object and the mass of the object.
The acceleration of an object depends directly The acceleration of an object depends directly
upon the net force acting upon the object, upon the net force acting upon the object,
and inversely upon the mass of the object. and inversely upon the mass of the object.
As the force acting upon an object is increased, As the force acting upon an object is increased,
the acceleration of the object is increased. the acceleration of the object is increased.
As the mass of an object is increased, the acceleration of the object is decreased. As the mass of an object is increased, the acceleration of the object is decreased.
Source: https://www.physicsclassroom.com/class/newtlaws/Lesson-3/Newton-s-Second-Law Source: https://www.physicsclassroom.com/class/newtlaws/Lesson-3/Newton-s-Second-Law
Formulation: Fnet = m a
Diagrammatic Explanation: Formulation: F_net = m a
Diagrammatic Explanation::
Forces are unbalanced Forces are unbalanced
| |
| |
@ -29,32 +33,39 @@ Diagrammatic Explanation:
__________________ ____________________ __________________ ____________________
| The acceleration | | The acceleration | | The acceleration | | The acceleration |
| depends directly | | depends inversely | | depends directly | | depends inversely |
|on the net Force | |upon the object's | | on the net force | | upon the object's |
|_________________| |mass_______________| | | | mass |
Units: |__________________| |____________________|
1 Newton = 1 kg X meters / (seconds^2)
How to use?
Inputs:
___________________________________________________
|Name | Units | Type |
|-------------|-------------------------|-----------|
|mass | (in kgs) | float |
|-------------|-------------------------|-----------|
|acceleration | (in meters/(seconds^2)) | float |
|_____________|_________________________|___________|
Output: Units: 1 Newton = 1 kg meters/seconds^2
___________________________________________________
How to use?
Inputs::
______________ _____________________ ___________
| Name | Units | Type | | Name | Units | Type |
|-------------|-------------------------|-----------| |--------------|---------------------|-----------|
|force | (in Newtons) | float | | mass | in kgs | float |
|_____________|_________________________|___________| |--------------|---------------------|-----------|
| acceleration | in meters/seconds^2 | float |
|______________|_____________________|___________|
Output::
______________ _______________________ ___________
| Name | Units | Type |
|--------------|-----------------------|-----------|
| force | in Newtons | float |
|______________|_______________________|___________|
""" """
def newtons_second_law_of_motion(mass: float, acceleration: float) -> float: def newtons_second_law_of_motion(mass: float, acceleration: float) -> float:
""" """
Calculates force from `mass` and `acceleration`
>>> newtons_second_law_of_motion(10, 10) >>> newtons_second_law_of_motion(10, 10)
100 100
>>> newtons_second_law_of_motion(2.0, 1) >>> newtons_second_law_of_motion(2.0, 1)