Answer:
Check the explanation
Step-by-step explanation:
The code will be
name=input('Enter file name:')
ls=open(name,'r').read().split('\\')
count=0;sums=0
for i in range(ls):
sums+=int(i)
count+=1
print('There were {} numbers in the file'.format(count))
print('The average is {}'.format(sums/count))
The output is