File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""
2- Magnetic flux (Φ) is a scalar quantity that measures the number of magnetic field lines (B)
3- that pass through a closed area (A). Furthermore, the magnetic flux depends on the angle
4- formed between the magnetic field and the normal line (N) in area A. Check out the formula
5- used to calculate this flux:
2+ ________________________________________________________________________________________
3+ Magnetic flux (Φ) is a scalar quantity that measures the number of magnetic field
4+ lines (B) that pass through a closed area (A). Furthermore, the magnetic flux depends
5+ on the angle formed between the magnetic field and the normal line (N) in area A.
6+ Check out the formula used to calculate this flux:
67 ------------
78 | Φ = B.A.cos(θ) |
89 ------------
1516(Description adapted from https://en.wikipedia.org/wiki/Ideal_gas_law )
1617"""
1718
18- from math import cos , radians as deg_to_rad
19-
19+ from math import cos , radians
2020
2121def check_args (
2222 magnetic_field : float ,
@@ -75,8 +75,8 @@ def magnetic_flux(
7575 ... ValueError: Invalid area. Should be a positive number.
7676 """
7777 check_args (magnetic_field , area , angle )
78- radians = deg_to_rad (angle )
79- return magnetic_field * area * cos (radians )
78+ rad = radians (angle )
79+ return magnetic_field * area * cos (rad )
8080
8181
8282if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments