Skip to content

Commit bfc804a

Browse files
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
1 parent d9092d8 commit bfc804a

File tree

1 file changed

+47
-36
lines changed

1 file changed

+47
-36
lines changed

Diff for: physics/newtons_second_law_of_motion.py

+47-36
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
"""
2-
Description :
3-
Newton's second law of motion pertains to the behavior of objects for which
4-
all existing forces are not balanced.
5-
The second law states that the acceleration of an object is dependent upon two variables
6-
- the net force acting upon the object and the mass of the object.
7-
The acceleration of an object depends directly
8-
upon the net force acting upon the object,
9-
and inversely upon the mass of the object.
10-
As the force acting upon an object is increased,
11-
the acceleration of the object is increased.
12-
As the mass of an object is increased, the acceleration of the object is decreased.
1+
r"""
2+
Description:
3+
Newton's second law of motion pertains to the behavior of objects for which
4+
all existing forces are not balanced.
5+
The second law states that the acceleration of an object is dependent upon
6+
two variables - the net force acting upon the object and the mass of the object.
7+
The acceleration of an object depends directly
8+
upon the net force acting upon the object,
9+
and inversely upon the mass of the object.
10+
As the force acting upon an object is increased,
11+
the acceleration of the object is increased.
12+
As the mass of an object is increased, the acceleration of the object is decreased.
13+
1314
Source: https://www.physicsclassroom.com/class/newtlaws/Lesson-3/Newton-s-Second-Law
14-
Formulation: Fnet = m • a
15-
Diagrammatic Explanation:
15+
16+
Formulation: F_net = m • a
17+
18+
Diagrammatic Explanation::
19+
1620
Forces are unbalanced
1721
|
1822
|
@@ -26,35 +30,42 @@
2630
/ \
2731
/ \
2832
/ \
29-
__________________ ____ ________________
30-
|The acceleration | |The acceleration |
31-
|depends directly | |depends inversely |
32-
|on the net Force | |upon the object's |
33-
|_________________| |mass_______________|
34-
Units:
35-
1 Newton = 1 kg X meters / (seconds^2)
33+
__________________ ____________________
34+
| The acceleration | | The acceleration |
35+
| depends directly | | depends inversely |
36+
| on the net force | | upon the object's |
37+
| | | mass |
38+
|__________________| |____________________|
39+
40+
Units: 1 Newton = 1 kg • meters/seconds^2
41+
3642
How to use?
37-
Inputs:
38-
___________________________________________________
39-
|Name | Units | Type |
40-
|-------------|-------------------------|-----------|
41-
|mass | (in kgs) | float |
42-
|-------------|-------------------------|-----------|
43-
|acceleration | (in meters/(seconds^2)) | float |
44-
|_____________|_________________________|___________|
45-
46-
Output:
47-
___________________________________________________
48-
|Name | Units | Type |
49-
|-------------|-------------------------|-----------|
50-
|force | (in Newtons) | float |
51-
|_____________|_________________________|___________|
43+
44+
Inputs::
45+
46+
______________ _____________________ ___________
47+
| Name | Units | Type |
48+
|--------------|---------------------|-----------|
49+
| mass | in kgs | float |
50+
|--------------|---------------------|-----------|
51+
| acceleration | in meters/seconds^2 | float |
52+
|______________|_____________________|___________|
53+
54+
Output::
55+
56+
______________ _______________________ ___________
57+
| Name | Units | Type |
58+
|--------------|-----------------------|-----------|
59+
| force | in Newtons | float |
60+
|______________|_______________________|___________|
5261
5362
"""
5463

5564

5665
def newtons_second_law_of_motion(mass: float, acceleration: float) -> float:
5766
"""
67+
Calculates force from `mass` and `acceleration`
68+
5869
>>> newtons_second_law_of_motion(10, 10)
5970
100
6071
>>> newtons_second_law_of_motion(2.0, 1)

0 commit comments

Comments
 (0)