blob: 47ccf9d9d0fdea6c6852aa52cd72653af67307d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
def octal_To_Decimal(n):
num = n;
dec_value = 0;
base = 1;
temp = num;
while (temp):
last_digit = temp % 10;
temp = int(temp / 10);
dec_value += last_digit*base;
base = base * 8;
return dec_value;
|