# A heater with the resistance of 8 Ohms is connected across the 120-V power line. How much is current I?
# Given data
V = 120# # Voltage of Power line=120 Volts
R = 8# # Heater Resistance=8 Ohms
I = V/R#
print 'The Current I = %0.2f Amps'%I
# A small lightbulb with a resistance of 2400 Ohms is connected across the 120-V power line. How much is current I?
# Given data
V = 120.# # Voltage of Power line=120 Volts
R = 2400# # Lightbulb Resistance=2400 Ohms
I = V/R#
print 'The Current I = %0.2f Amps'%I
# If a 12-Ohms resistor is carrying a current of 2.5 A, how much is its voltage?
# Given data
I = 2.5# # Current=2.5 Amps
R = 12# # Resistance=12 Ohms
V = I*R#
print 'The Voltage = %0.2f Volts'%V
# How much is the resistance of a lightbulb if it draws 0.16 A from a 12-V battery?
# Given data
V = 12# # Voltage of Battery=12 Volts
I = 0.16# # Current drawn form Battery=0.16 Amps
R = V/I
print 'The Resistance = %0.2f ohms'%R
# The I of 8 mA flows through a 5-kOhms Resistor. How much is the IR voltage?
# Given data
I = 8*10**-3# # Current flowing through Resistor=8m Amps
R = 5*10**3# # Resistance=5k Ohms
V = I*R#
print 'The Voltage = %0.2f Volts'%V
# How much current is produced by 60 V across 12 kOhms?
# Given data
V = 60.0# # Voltage=60 Volts
R = 12*10**3# # Resistance=12k Ohms
I = V/R#
print 'The Current I = %0.3f Amps'%I
print 'i.e 5 mAmps'
# A toaster takes 10 A from the 120-V power line. How much power is used?
# Given data
V = 120# # Voltage of Power line=120 Volts
I = 10# # Current drawn from Powerline=10 Amps
P = V*I#
print 'The Power used = %0.2f Watts'%P
print 'OR 1.2 kW'
# How much current flows in the filament of a 300-W bulb connected to the 120-V power line?
# Given Data
V = 120.0# # Voltage of Power line=120 Volts
P = 300# # Power of Bulb=300 Watts
I = P/V#
print 'The Current I = %0.2f Amps'%I
# How much current flows in the filament of a 60-W bulb connected to the 120-V power line?
# Given Data
V = 120# # Voltage of Power line=120 Volts
P = 60.0# # Power of Bulb=60 Watts
I = P/V#
print 'The Current I = %0.2f Amps'%I
print 'OR 500 mA'
# Asuming that the cost of electricity is 6 cent per kWh, how much will it cost to light a 100-W lightbulb for 30 days?
h = 24*30# # Total hours = 24 hrs * 30 days
kWh = 0.1*h# # 100W=0.1kW
Cost = kWh*0.06# # 6 cent = $0.06
print 'Cost = %0.2f $'%Cost
# Calculate the power in a circuit where the source of 100 V produces 2 A in a 50 Ohms Resistor.
# Given data
I = 2# # Current=2 Amps
R = 50# # Resistance=50 Ohms
V = 100# # Voltage Source=100 Volts
P = I*I*R#
print 'The Power = %0.2f Watts'%P
# Calculate the power in a circuit where the source of 100 V produces 4 A in a 25 Ohms Resistor.
# Given data
I = 4# # Current=4 Amps
R = 25# # Resistance=25 Ohms
V = 100# # Voltage Source=100 Volts
P = I*I*R#
print 'The Power = %0.2f Watts'%P
# How much current is needed for a 600-W, 120-V toaster?
# Given data
V = 120.0# # Applied Voltage=120 Volts
P = 600# # Power of toaster=600 Watts
I = P/V#
print 'The Current I = %0.2f Amps'%I
# How much is the resistance of a 600-W, 120-V toaster?
# Given data
V = 120.0# # Applied Voltage=120 Volts
P = 600# # Power of toaster=600 Watts
R = (V*V)/P#
print 'The Resistance = %0.2f Ohms'%R
from math import sqrt
# How much current is needed for a 24 Ohms Resistor that dissipates 600 W?
# Given data
R = 24.0# # Resistance=24 Ohms
P = 600.0# # Power=600 Watts
I = sqrt(P/R)#
print 'The Current I = %0.2f Amps'%I
# Determine the required resistance and appropriate wattage rating of a resistor to meet the following requirements: The resistor must have a 30-V IR drop when its current is 20 mA. The resistors available have the following wattage ratings: 1⁄8, 1⁄4, 1⁄2, 1, and 2 W.
# Given data
I = 20.0*10**-3# # Current=20m Amps
V = 30.0# # Voltage Drop=30 Volts
R = V/I#
print 'The Resistor value = %0.2f Ohms'%R
print 'i.e 1.5 kohms'
P = I*I*R#
print 'The Power = %0.2f Watts'%P
print 'OR 600 mW'
#Determine the required resistance and appropriate wattage rating of a carbonfilm resistor to meet the following requirements: The resistor must have a 225-V IR drop when its current is 150 uA. The resistors available have the following wattage ratings: 1⁄8, 1⁄4, 1⁄2, 1, and 2 W.
# Given data
I = 150.0*10**-6# # Current=150 uAmps
V = 225# # Voltage Drop=225 Volts
R = V/I#
print 'The Resistor value = %0.f Ohms'%R
print 'i.e 1.5 Mohms'
P = I*I*R#
print 'The Power = %0.5f Watts'%P
print 'i.e 33.75 mW'