#Given
A=4 #NUMERICAL CODE FOR BAND YELLOW
B=7 #NUMERICAL CODE FOR BAND VIOLET
C=3 #NUMERICAL CODE FOR BAND ORANGE
D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%
#Resistor Value Calculation
R=(A*10+B)*10**C
#Tolerance Value Calulation
T=D*R/100;
R1=R-T;
R2=R+T;
# Results
print "Therefore thr resistance should be within the range ", R1*10**(-3) ,"kohm","and", R2*10**(-3),"kohm"
#Given
A=8 #NUMERICAL CODE FOR BAND GRAY
B=6 #NUMERICAL CODE FOR BAND BLUE
C=-1 #NUMERICAL CODE FOR BAND GOLD
D=5 #TOLERANCE VALUE FOR BAND GOLD i.e. 5%
#Resistor Value Calculation
R=(A*10+B)*10**C
#Tolerance Value Calulation
T=D*R/100
R1=R-T
R2=R+T
# Results
print "Range of Values of the Resistor is between ",R1,"ohm","and",R2,"ohm"