# Définition des constantes
R=8.0# Résistance en ohms
V=120.0# Tension en volts
I=V/R# Courant électrique en amps
# Calcul de la puissance électrique
P=V*I# Puissance en watts
# Affichage des résultats
print("Résistance :",R,"ohms")print("Tension :",V,"volts")print("Courant :",I,"amps")print("Puissance :",P,"watts")# Calcul de la résistance totale dans un circuit série
R_serie=R*2# Résistance totale en ohms
I_serie=V/R_serie# Courant total en amps
# Affichage des résultats pour le circuit série
print("Résistance totale (circuit série) :\n",R_serie,"ohms")print("Courant total (circuit série) :\n",I_serie,"amps")# Calcul de la résistance totale dans un circuit parallèle
R_parallel=R/2# Résistance totale en ohms
I_parallel=V/R_parallel# Courant total en amps
# Affichage des résultats pour le circuit parallèle
print("Résistance totale (circuit parallèle) :\n",R_parallel,"ohms")print("Courant total (circuit parallèle) :\n",I_parallel,"amps")
During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:
Ensure the proper functioning of the site (essential cookies); and
Track your browsing to send you personalized communications if you have created a professional account on the site and can be contacted (audience measurement cookies).
With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.