color=["black","brown","red","orange","yellow"
,"green","blue","violet","grey","white"]
n=color.index((input("Enter the 1st color :")))
m=color.index((input("Enter the 2nd color :")))
p=color.index((input("Enter the 3rd color :")))
q=int(((n*10)+(m))*(10**(p)))
z=q/1000
#clcoding.com
print("\nThe Resister Value Is :")
print(f"{q}Ω and in Kiloohm : {z}kΩ")
Enter the 1st color :green Enter the 2nd color :grey Enter the 3rd color :blue The Resister Value Is : 58000000Ω and in Kiloohm : 58000.0kΩ
0 Comments:
Post a Comment