def hexa(inputfile1): decimal=0 mul=0 for st in inputfile1: ##READ THE INPUT FILES if st== "a"or st=="A": ## CHECK THE ALPHABATES st=10 if st=="b"or st=="B": st=11 if st=="c"or st=="C": st=12 if st=="d"or st=="D": st=13 if st=="e" or st=="E": st=14 if st=="f"or st=="F": st=15 decimal=decimal*16+int(st) ##HEXA TO DECIMAL CONVERSION mul=mul+1 ## CALCULATE THE MULTIPLICATION return decimal,mul import sys from time import clock f=open("c:\inputs\in5_9.txt","r") f1=open("out_9_sec5_9.txt","w") inputfile1,inputfile2=f.readline().split(",")##SPLIT THE COMMA FROM INPUT start=clock() add=0 num,mul1=hexa(inputfile1) ## CALL FUNCTION FOR FIRST INPUT num1,mul2=hexa(inputfile2) ## CALL FUNCTION FOR SECOND INPUT mul=mul1+mul2 data=[] while num