Literacy Project/Matching day1

From OLPC
Jump to navigation Jump to search

cjb@owl:/home/ethiopia/richard/wonchi_2012-05-15$ for i in *; do echo -n "tablet $i "; perl -le '$inside=0; $questions=0; while (<>) { if (m/START OF NEW QUESTION/) { $inside = 1; next; } if ($inside == 1) { if (m/ANSWER CORRECT/) { $correct++; $questions++; } elsif (m/ANSWER INCORRECT/) { $questions++; } $inside = 0; } } $percent = int($correct/$questions * 100); print "answered $correct out of $questions questions correctly, which is $percent%"' < $i/edu*/csv_$i/Matching.csv; done > ~/matching.results

cjb@owl:/home/ethiopia/richard/wonchi_2012-05-15$ cat /home/cjb/matching.results 
tablet 01 answered 12 out of 38 questions correctly, which is 31%
tablet 02 answered 21 out of 73 questions correctly, which is 28%
tablet 03 answered 1 out of 3 questions correctly, which is 33%
tablet 04 answered 3 out of 12 questions correctly, which is 25%
tablet 05 answered 1 out of 4 questions correctly, which is 25%
tablet 06 didn't launch Matching
tablet 07 answered 6 out of 22 questions correctly, which is 27%
tablet 08 answered 14 out of 42 questions correctly, which is 33%
tablet 09 answered 11 out of 58 questions correctly, which is 18%
tablet 10 answered 19 out of 97 questions correctly, which is 19%
tablet 11 answered 19 out of 63 questions correctly, which is 30%
tablet 12 answered 95 out of 413 questions correctly, which is 23%
tablet 13 answered 20 out of 90 questions correctly, which is 22%
tablet 14 answered 12 out of 45 questions correctly, which is 26%
tablet 15 answered 6 out of 22 questions correctly, which is 27%
tablet 16 answered 22 out of 78 questions correctly, which is 28%
tablet 17 answered 9 out of 30 questions correctly, which is 30%
tablet 18 answered 16 out of 52 questions correctly, which is 30%
tablet 19 answered 5 out of 23 questions correctly, which is 21%
tablet 20 answered 1 out of 16 questions correctly, which is 6%