Skip to content

Instantly share code, notes, and snippets.

@MaksimDmitriev
Created November 14, 2025 08:36
Show Gist options
  • Select an option

  • Save MaksimDmitriev/9b158c3a0d194f4b341716164c552e5c to your computer and use it in GitHub Desktop.

Select an option

Save MaksimDmitriev/9b158c3a0d194f4b341716164c552e5c to your computer and use it in GitHub Desktop.
Calculate with different voltages
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}")
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