You will write three functions that a designer of resistors might use.
The idea. A round wire has with . A metal has . A carbon resistor shows two digits, a power of ten and a tolerance in coloured bands.
Your tasks.
wire_resistance, return the resistance in ohm of a round wire. The resistivity is in ohm metre, and the length and diameter are in metres.resistance_at, return the resistance at the new temperature. The reference temperature is 20 degrees Celsius.decode, bands is a list of colours such as ["red", "red", "brown", "gold"]. Return the value in ohm and the tolerance in per cent. With only three bands the tolerance is 20.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…