Como calcular valores de resistores em série em Python usando UliEngineering
Você pode calcular facilmente a resistência total de resistores em série usando a biblioteca Python UliEngineering:
Ω
⚠
Ω
⚠
series_resistors.py
from UliEngineering.Electronics.Resistors import *
from UliEngineering.EngineerIO import *
# Calcular resistência total de dois resistores em série
total = series_resistors("1k", "2k")
print(f"Total resistance: {format_value(total, 'Ω')}")
# Calcular resistência total de três resistores em série
total = series_resistors("1k", "2k", "3k")
print(f"Total resistance: {format_value(total, 'Ω')}")Exemplo de saída
series_resistors_output.txt
Total resistance: 3.00 kΩ
Total resistance: 6.00 kΩA função series_resistors() aceita qualquer número de valores de resistor como argumentos e calcula a resistência total usando a fórmula simples de resistência em série:
Check out similar posts by category:
Calculators, Electronics, Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow