check50

cs50/problems/2019/fall/readability


:) readability.c exists

Log
checking that readability.c exists...

:) readability.c compiles

Log
running clang readability.c -o readability -std=c11 -ggdb -lm -lcs50...

:) handles single sentence with multiple words

Log
running ./readability...
sending input In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever since....
checking for output "Grade 7\n"...
checking for EOF...
checking that program exited with status 0...

:( handles punctuation within a single sentence

Cause
expected "Grade 9\n", not "Grade 8\n"

Log
running ./readability...
sending input There are more things in Heaven and Earth, Horatio, than are dreamt of in your philosophy....
checking for output "Grade 9\n"...

Expected Output:
Grade 9
Actual Output:
Grade 8

:( handles more complex single sentence

Cause
expected "Grade 8\n", not "Grade 9\n"

Log
running ./readability...
sending input Alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was reading, but it had no pictures or conversations in it, "and what is the use of a book," thought Alice "without pictures or conversation?"...
checking for output "Grade 8\n"...

Expected Output:
Grade 8
Actual Output:
Grade 9

:( handles multiple sentences

Cause
expected "Grade 5\n", not "Grade 4\n"

Log
running ./readability...
sending input Harry Potter was a highly unusual boy in many ways. For one thing, he hated the summer holidays more than any other time of year. For another, he really wanted to do his homework, but was forced to do it in secret, in the dead of the night. And he also happened to be a wizard....
checking for output "Grade 5\n"...

Expected Output:
Grade 5
Actual Output:
Grade 4

:) handles multiple more complex sentences

Log
running ./readability...
sending input It was a bright cold day in April, and the clocks were striking thirteen. Winston Smith, his chin nuzzled into his breast in an effort to escape the vile wind, slipped quickly through the glass doors of Victory Mansions, though not quickly enough to prevent a swirl of gritty dust from entering along with him....
checking for output "Grade 10\n"...
checking for EOF...
checking that program exited with status 0...

:( handles longer passages

Cause
expected "Grade 8\n", not "Grade 7\n"

Log
running ./readability...
sending input When he was nearly thirteen, my brother Jem got his arm badly broken at the elbow. When it healed, and Jem's fears of never being able to play football were assuaged, he was seldom self-conscious about his injury. His left arm was somewhat shorter than his right; when he stood or walked, the back of his hand was at right angles to his body, his thumb parallel to his thigh....
checking for output "Grade 8\n"...

Expected Output:
Grade 8
Actual Output:
Grade 7

:) handles questions in passage

Log
running ./readability...
sending input Would you like them here or there? I would not like them here or there. I would not like them anywhere....
checking for output "Grade 2\n"...
checking for EOF...
checking that program exited with status 0...

:) handles reading level before Grade 1

Log
running ./readability...
sending input One fish. Two fish. Red fish. Blue fish....
checking for output "Before Grade 1\n"...
checking for EOF...
checking that program exited with status 0...

:) handles reading level at Grade 16+

Log
running ./readability...
sending input A large class of computational problems involve the determination of properties of graphs, digraphs, integers, arrays of integers, finite families of finite sets, boolean formulas and elements of other countable domains....
checking for output "Grade 16+\n"...
checking for EOF...
checking that program exited with status 0...