Octal number-
- A number which expressed in the base-8 numeral system.
- Octal number range is 0 to 7
Decimal number -
- A number which expressed in the base-10 numeral system.
- Decimal number range is 0 to 9
Conversion of Octal number to decimal number -
Example -
Octal number is 10
Its decimal equivalent is 8
octal number is 25
Its decimal equivalent is 21
program-
print("Enter Octal number")
n=int(input())
s=0
i=0
while(n>0):
t=n%10
s=s+t*(8**i)
n=int(n/10)
i=i+1
print("Decimal equivalent is - "+str(s))
Enter Octal number
10
Decimal equivalent is - 8
Enter Octal number
25
Decimal equivalent is - 21