import codecs

f=codecs.open('spellans','r','utf-8')
f2=codecs.open('correctans1.txt','r','utf-8')

C=0
I=0
count=0
for line1,line2 in zip(f2.readlines(),f.readlines()):
	line2=line2.strip('\n')
        line1=line1.strip('\n')
        words=line1.split(':')
        words[0]=words[0].strip(' ')
	wordr=line2.strip(' ')
	if wordr==words[0]:
		C+=1
	else:
		I+=1
	count+=1

print (float(C)/float(count))*100
	
