Skip to content

Commit ec76946

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 2fa0740 according to the output from Autopep8. Details: https://app.deepsource.com/gh/avinashkranjan/Amazing-Python-Scripts/transform/960ac421-22f9-4bf6-8689-76500b996d5f/
1 parent 2fa0740 commit ec76946

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)