huenfrplsv
# Count and report the number of lines and characters in a file. print "File name: " fn = gets.chomp begin f = open(fn) nlines = 0 length = 0 f.each { |line| nlines += 1; length += line.length } rescue print "File read failed: " + $! + "\n" else print fn, ": ", nlines, " lines, ", length, " characters.\n" end

Elapsed time 00:00
Total errors 0
Not corrected 0
Accuracy -
Gross WPM ? -
Net WPM ? -
Press Esc to close this popup or F5 to restart practicing!

Words   Numbers   Texts   Lorem ipsum   Poems   Sourcecode   Custom text