Created
November 14, 2025 08:36
-
-
Save MaksimDmitriev/9b158c3a0d194f4b341716164c552e5c to your computer and use it in GitHub Desktop.
Calculate with different voltages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| k = 0.0334 | |
| omega = 70 | |
| kb = 0.0334 | |
| R = 8.7 | |
| def calculate(v) -> float: | |
| return (k * v - omega * k * kb) / (R * omega) | |
| if __name__ == "__main__": | |
| result = calculate(3) | |
| result2 = calculate(4) | |
| result3 = calculate(5) | |
| print(f"The result 3V is: {result}") | |
| print(f"The result 4V is: {result2}") | |
| print(f"The result 5V is: {result3}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The result 3V is: 3.630673234811166e-05 | |
| The result 4V is: 9.115073891625615e-05 | |
| The result 5V is: 0.00014599474548440062 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment