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 118 views
2 answers 154 views
1 answer 152 views
1 answer 147 views
2 answers 226 views
...