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 140 views
1 answer 134 views
1 answer 110 views
2 answers 138 views
2 answers 208 views
...