Skip to content

Resistor color: no task description #1546

@okeegan

Description

@okeegan

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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions