Skip to content

Commit

Permalink
resistor-color: sync (#330)
Browse files Browse the repository at this point in the history
* Sync the `resistor-color` exercise's docs with the latest data.

* Sync the `resistor-color` exercise's metadata with the latest data.
  • Loading branch information
ErikSchierboom authored Sep 5, 2024
1 parent 3689186 commit adb97af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
32 changes: 18 additions & 14 deletions exercises/practice/resistor-color/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:

* Each resistor has a resistance value.
* Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
- Each resistor has a resistance value.
- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.

To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
Each band has a position and a numeric value.
Expand All @@ -15,21 +15,25 @@ In this exercise you are going to create a helpful program so that you don't hav

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
- black: 0
- brown: 1
- red: 2
- orange: 3
- yellow: 4
- green: 5
- blue: 6
- violet: 7
- grey: 8
- white: 9

The goal of this exercise is to create a way:

- to look up the numerical value associated with a particular color band
- to list the different band colors

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.
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][e-color-code].

More information on the color encoding of resistors can be found in the [Electronic color code Wikipedia article](https://en.wikipedia.org/wiki/Electronic_color_code)
[e-color-code]: https://en.wikipedia.org/wiki/Electronic_color_code
2 changes: 1 addition & 1 deletion exercises/practice/resistor-color/.meta/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"blurb": "Convert a resistor band's color to its numeric representation",
"blurb": "Convert a resistor band's color to its numeric representation.",
"authors": [
"tejasbubane"
],
Expand Down

0 comments on commit adb97af

Please sign in to comment.