Skip to content

Commit ace41bf

Browse files
Merge pull request #2266 from avinashkranjan/deepsource-transform-a397053f
format code with autopep8
2 parents 1661938 + ec76946 commit ace41bf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hexCalculator/hexCalculator.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@
22
5: '5', 6: '6', 7: '7',
33
8: '8', 9: '9', 10: 'A', 11: 'B', 12: 'C',
44
13: 'D', 14: 'E', 15: 'F'}
5-
5+
6+
67
def decimalToHexadecimal(a):
78
b = ''
8-
while(a > 0):
9+
while (a > 0):
910
remainder = a % 16
1011
b = conversion_table[remainder] + b
1112
a = a // 16
12-
13+
1314
return b
1415

16+
1517
decimal = int(input("Enter decimal value: "))
1618
hexadecimal = decimalToHexadecimal(decimal)
1719

1820
print("Decimal Value:", decimal)
19-
print("Hexadecimal Value:", hexadecimal)
21+
print("Hexadecimal Value:", hexadecimal)

0 commit comments

Comments
 (0)