How to calculate the decimal value from octal value in Python

1 Answer

0 votes
# Octal = 1517

decimal = (1*(8**3)) + (5*(8**2)) + (1*(8**1)) + (7*(8**0)) 

print(decimal)



'''
run:

847

'''

 



answered Dec 31, 2020 by avibootz

Related questions

2 answers 153 views
1 answer 106 views
1 answer 172 views
1 answer 135 views
...