# a
N2 = '101'; # binary ordered sequence
N = int(N2,base=2) # decimal equivalent of N2
print '%s' %("a")
print'%s %.f'%("The decimal equivqlent of 101 is",N)
# b
N2 = '11011'; # binary ordered sequence
N = int(N2,base=2); # decimal equivalent of N2
print '%s' %("b")
print '%s %.f' %("decimal equivalent of 11011 = ",N)
# a
N8 = '432'; # octal number
N = int(N8,base=8); # decimal representation of N8
print '%s' %("a")
print '%s %.f' %("decimal equivalent of 432 = ",N)
# b
N16 = 'C4F'; # hexadecimal number
N = int(N16,base=16);#hex2dec(N16); # decimal representation of N16
print '%s' %("b")
print '%s %.f' %("decimal equivalent of C4F = ",N)
a="247"
b=oct(247)
print("The octal equivalent of 247 is")
print(b)
dec=247
bina=bin(dec) #binary output
print("\nThe Binary equivalent of 247 is ")
print(bina)