How to calculate the decimal value from hexadecimal value in Python

1 Answer

0 votes
# Hexadecimal = 1A4F

decimal = (1*(16**3)) + (10*(16**2)) + (4*(16**1)) + (15*(16**0))

print(decimal)



'''
run:

6735

'''

 



answered Dec 31, 2020 by avibootz

Related questions

1 answer 141 views
1 answer 135 views
1 answer 111 views
2 answers 139 views
2 answers 209 views
...