Skip to content

Commit 59bc44a

Browse files
Merge pull request #2999 from khanhkhanhlele/Electronics_Algorithms/resistance.py
Fix typos in Electronics_Algorithms/resistance.py
2 parents 8845967 + 6b2e06b commit 59bc44a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Electronics_Algorithms/resistance.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
def resistance_calculator(
2-
material: str, lenght: float, section: float, temperature: float
2+
material: str, length: float, section: float, temperature: float
33
):
44
"""
55
material is a string indicating the material of the wire
66
7-
lenght is a floating value indicating the lenght of the wire in meters
7+
length is a floating value indicating the length of the wire in meters
88
99
diameter is a floating value indicating the diameter of the wire in millimeters
1010
@@ -35,6 +35,6 @@ def resistance_calculator(
3535
temp_coefficient = materials[material]["coefficient"]
3636

3737
rho = rho_20deg * (1 + temp_coefficient * (temperature - 20))
38-
resistance = rho * lenght / section
38+
resistance = rho * length / section
3939

4040
return f"{resistance}Ω"

0 commit comments

Comments
 (0)