Skip to content

Resistor series # 2 : ResistorColors #1464

Closed
@emcoding

Description

The ResistorColor exercise is meant as the start of a series of resistor decoding exercises.
Here's number 2: the Resistor Significants exercise.

For this exercise, a given input represents the colors of the first 2 bands of a resistor, for instance ['brown', 'black'] and should return the combined number value 10.

This are real life examples of such color combinations:
image
translated to tests:

  • brown and black -> 10
  • orange and orange -> 33,
  • blue and grey -> 68
  • yellow and violet -> 47

About the naming:
The two first bands of resistors are also referenced to as 'significant figures'. The other bands have a different meaning (number of zeros, percentages).

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions