Skip to content

Commit d8d712d

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent b8bef86 commit d8d712d

File tree

1 file changed

+28
-5
lines changed

1 file changed

+28
-5
lines changed

conversions/decimal_to_any.py

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
"""Convert a positive Decimal Number to Any Other Representation"""
22

33

4-
ALPHABET_VALUES = {'10': 'A', '11': 'B', '12': 'C', '13': 'D', '14': 'E', '15': 'F',
5-
'16': 'G', '17': 'H', '18': 'I', '19': 'J', '20': 'K', '21': 'L',
6-
'22': 'M', '23': 'N', '24': 'O', '25': 'P', '26': 'Q', '27': 'R',
7-
'28': 'S', '29': 'T', '30': 'U', '31': 'V', '32': 'W', '33': 'X',
8-
'34': 'Y', '35': 'Z'}
4+
ALPHABET_VALUES = {
5+
"10": "A",
6+
"11": "B",
7+
"12": "C",
8+
"13": "D",
9+
"14": "E",
10+
"15": "F",
11+
"16": "G",
12+
"17": "H",
13+
"18": "I",
14+
"19": "J",
15+
"20": "K",
16+
"21": "L",
17+
"22": "M",
18+
"23": "N",
19+
"24": "O",
20+
"25": "P",
21+
"26": "Q",
22+
"27": "R",
23+
"28": "S",
24+
"29": "T",
25+
"30": "U",
26+
"31": "V",
27+
"32": "W",
28+
"33": "X",
29+
"34": "Y",
30+
"35": "Z",
31+
}
932

1033

1134
def decimal_to_any(num: int, base: int) -> str:

0 commit comments

Comments
 (0)