RE: [EASY] Programming Challenge 09-15-2013, 07:31 PM
#11
Python solution
Spoiler:
Code:
import os
print("Enter file name")
while(True):
try:
name = input()
f = open(name, 'r')
break
except:
print("\nFile could not be found. Please try again.")
chars = 0
lines = 0
for line in f:
lines += 1
for char in line:
chars += 1
print("Chars: " + str(chars))
print("Lines: " + str(lines))
![[Image: jWSyE88.png]](http://i.imgur.com/jWSyE88.png)
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)






