-
-
Notifications
You must be signed in to change notification settings - Fork 555
Closed
Description
The explanation for how resistor colors (#1466) work is fine, but in terms of what the task actually is – there's not much there.
These colors are encoded as follows:
Black: 0
Brown: 1
Red: 2
Orange: 3
Yellow: 4
Green: 5
Blue: 6
Violet: 7
Grey: 8
White: 9
Mnemonics map the colors to the numbers, that, when stored as an array, happen to map to their index in the array: Better Be Right Or Your Great Big Values Go Wrong.
More information on the color encoding of resistors can be found in the Electronic color code Wikipedia article
I propose the addition of a line that describes the expected input and output for this exercise. Maybe something like:
"Write a function that takes a band color as input and outputs the associated number."
zuzia-kru and Narendra404
Metadata
Metadata
Assignees
Labels
No labels