Ładowanie zadania…
On resistors, colored bands encode digits, so each color can be converted into a number. The function color_code receives a color name color as a string and returns its value in order: black is 0, brown is 1, and so on up to white as 9.
"black"0"white"9"orange"3def color_code(color: str) -> int:
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj się