Conversation
|
Okay, so After many attempts, every check except for the links passes. I don't think I can do much about the links in this PR and it's out of scope so it should be fine™️ |
| So an input `list` of `["orange", "orange", "blue", "red"]` should return: | ||
|
|
||
| "33 megaohms ±2%" | ||
|
|
There was a problem hiding this comment.
Could you mention the decimals used
|
Resistors are nightmare fuel for the colourblind. |
| The program will take 1, 4, or 5 colors as input and output the correct value in ohms. | ||
| The color bands are encoded as follows: | ||
|
|
||
| - black: 0 |
There was a problem hiding this comment.
Could we switch to a table for the colors (here and tolerance)?
| - black: 0 | ||
| - brown: 1 | ||
| - red: 2 | ||
| - orange: 3 | ||
| - yellow: 4 | ||
| - green: 5 | ||
| - blue: 6 | ||
| - violet: 7 | ||
| - grey: 8 | ||
| - white: 9 |
There was a problem hiding this comment.
| - black: 0 | |
| - brown: 1 | |
| - red: 2 | |
| - orange: 3 | |
| - yellow: 4 | |
| - green: 5 | |
| - blue: 6 | |
| - violet: 7 | |
| - grey: 8 | |
| - white: 9 | |
| | Color | Value | | |
| |-------------|-------| | |
| | Black | 0 | | |
| | Brown | 1 | | |
| | Red | 2 | | |
| | Orange | 3 | | |
| | Yellow | 4 | | |
| | Green | 5 | | |
| | Blue | 6 | | |
| | Violet | 7 | | |
| | Gray | 8 | | |
| | White | 9 | | |
| |-------------|-------| |
For convenience, in case you want to use this.
I did not leave it in a more "codey" flavor, since it is the information not the formatting that is important here (the dash and colon looks like adherence to some formal syntax for some languages data structures).
| - grey - 0.05% | ||
| - violet - 0.1% | ||
| - blue - 0.25% | ||
| - green - 0.5% | ||
| - brown - 1% | ||
| - red - 2% | ||
| - gold - 5% | ||
| - silver - 10% |
There was a problem hiding this comment.
| - grey - 0.05% | |
| - violet - 0.1% | |
| - blue - 0.25% | |
| - green - 0.5% | |
| - brown - 1% | |
| - red - 2% | |
| - gold - 5% | |
| - silver - 10% | |
| | Color | Tolerance | | |
| |--------|----------:| | |
| | Grey | ±0.05% | | |
| | Violet | ±0.10% | | |
| | Blue | ±0.25% | | |
| | Green | ±0.50% | | |
| | Brown | ±1.00% | | |
| | Red | ±2.00% | | |
| | Gold | ±5.00% | | |
| | Silver | ±10.00% | | |
| |--------|-----------| |
There was a problem hiding this comment.
Or if you want to right-align the Tolerances:
| Color | Tolerance |
| ----------- | --------: |
| Grey | 0.05% |
| Silver | 10% |
| Color | Tolerance |
|---|---|
| Grey | 0.05% |
| Silver | 10% |
There was a problem hiding this comment.
We probably need to include the ± symbol here, since IIRC, the tests check for it.
There was a problem hiding this comment.
Good catch. If anyone wants to amend, feel free, since I'm away from a computer for a while.
There was a problem hiding this comment.
Should be able to click on "Apply suggestion" if it is looking OK now.
| title = "Resistor Color Tolerance" | ||
| blurb = "Convert color codes as used on resistors with different bands to a human-readable label." | ||
| source = "Ported for the Python Track" | ||
| source = "Ported from the Python Track" |
There was a problem hiding this comment.
Since Meatball was the genesis of this exercise on the Python track, we should give him author credit here. (Sorry - I missed this the first time around)
There was a problem hiding this comment.
Do you have a link to the original conversation then, or should it be just 'credit to Meatball'
There was a problem hiding this comment.
| source = "Ported from the Python Track" | |
| source = "Meatball" |
or
| source = "Ported from the Python Track" | |
| source = "@meatball133" |
+cc @meatball133 for input :)
There was a problem hiding this comment.
For relative-distance, we just used vaeng without an @ and the source URL was the problem specs PR. From that context, it was clear vaeng was an Exercism / GitHub user. However, we probably shouldn't link to this PR (given it's by Cool-Katt not meatball) but the original exercise PR on the Python track OR an Exercism profile. vaeng is not an English word so it likely wouldn't be read as such while meatball is. "@Meatball" makes it clearer it's likely an online handle on Exercism or elsewhere.
zeektvbox01-hub
left a comment
There was a problem hiding this comment.
Try to add a mention of decimal values
No description provided.