mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Update coulombs_law.py docs (#9667)
* 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>
This commit is contained in:
parent
700df39ad4
commit
24dbdd0b88
|
@ -32,7 +32,7 @@ def coulombs_law(q1: float, q2: float, radius: float) -> float:
|
|||
17975103584.6
|
||||
"""
|
||||
if radius <= 0:
|
||||
raise ValueError("The radius is always a positive non zero integer")
|
||||
raise ValueError("The radius is always a positive number")
|
||||
return round(((8.9875517923 * 10**9) * q1 * q2) / (radius**2), 2)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user