#Name:Asia Sharif

#Student Number: 1217577

#Lab Section:L10

#Date:Oct.12,2012



fname=raw_input("please write the name of the file")

   

infile = open("wc_output.txt","r")

x=0

y=0

z=0

for line in infile:

     x=x+1

     word=line.split()

     y=y + len(word)

     character=line.split("\n")

     z=z+len(character[0])

     

infile.close()

print x             

print y

print z



outfile=open("wc_output.txt","w")

outfile.write(str(x))

outfile.write("\n")

outfile.write(str(y))

outfile.write("\n")

outfile.write(str(z))





outfile.close()

              



   



"""





#Design Question:



The best way to compute the number of lines, words, and characters in a file,

is by reading the file once because its faster and esier. Aslo, by reading the line

once, we dont have to rename our files and define the variables over again.

"""





