Como calcular potência a partir de corrente e tensão em Python usando UliEngineering
Você pode calcular facilmente potência elétrica a partir de corrente e tensão usando a biblioteca Python UliEngineering:
Σ
TechOverflow calculators:
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
You can enter values with SI suffixes like 12.2m (equivalent to 0.012) or 14k (14000) or 32u (0.000032).
The results are calculated while you type and shown directly below the calculator, so there is no need to press return or click on a Calculate button.
V
⚠
A
⚠
power_by_current_and_voltage.py
from UliEngineering.Electronics.Power import *
from UliEngineering.EngineerIO import *
# Calcular potência para 5V a 1A
power = power_by_current_and_voltage("5V", "1A")
print(f"Power for 5V at 1A: {format_value(power, 'W')}")
# Calcular potência para 12V a 0.5A
power = power_by_current_and_voltage("12V", "0.5A")
print(f"Power for 12V at 0.5A: {format_value(power, 'W')}")Exemplo de saída
power_by_current_and_voltage_output.txt
Power for 5V at 1A: 5.00 W
Power for 12V at 0.5A: 6.00 WA potência é calculada usando a fórmula: $P = V \times I$
Posts relacionados
- Como calcular corrente através do resistor em Python usando UliEngineering
- Como calcular tensão através do resistor em Python usando UliEngineering
- Como calcular o valor do resistor a partir de tensão e corrente em Python usando UliEngineering
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