Skip to main content

Questions tagged [pset2-readability]

Filter by
Sorted by
Tagged with
1 vote
1 answer
26 views

Problem set 2 - Readability

I'm trying to solve the Readability set but I'm not able to pass the condition for the question case. When I run check50, I get this error. Cause expected "Grade 2\n", not "Grade 3\n&...
Craig D'Silva's user avatar
0 votes
1 answer
30 views

i cannot see what is wrong but each time i type an input i get the answer in negative numbers aka "before grade 1"

#include <cs50.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <math.h> int count_letters(string text); int count_words(string text); int ...
Bushra Mogareb's user avatar
0 votes
1 answer
53 views

pset2 readability test not calculating correct grade

I believe I've written the readability.c program correctly to count letters, words, and sentences based on readability prompt and calculate the grade index. But whenever I test the grade index, I'm ...
karlares's user avatar
0 votes
1 answer
27 views

Readability can't compile. Error : expected '(' after 'if'

#include <cs50.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <math.h> int main(void) { //prompt user for a string string text = ...
Alexandra Bartee's user avatar
0 votes
1 answer
17 views

pset2, readability, test not passing(stuck in a non terminating loop), not sure what's the problem

#include <cs50.h> #include <stdio.h> #include <ctype.h> #include <string.h> int count_letters(string text); int main(void) { string input = get_string("Text: ");...
Pratheek Reddy's user avatar
0 votes
1 answer
869 views

CS50 Readability solution unsolvable to me

I coded this solution myself, but I really can't figure out where I did wrong, I've spent days on this, and I would really appreciate any help!! Please, 😭 #include <cs50.h> #include <stdio.h&...
az ab's user avatar
  • 1
0 votes
0 answers
48 views

Readability (pset2) - Sanity check

Consider the following scenario: If I write the text below it gives me an expected Grade 3, but if I write just "Congratulations!" it gives me an unexpected Grade 42 (16+): ~/readability/ $ ....
Mirela Buruiana's user avatar
0 votes
2 answers
355 views

When I try to execute the file is says "bash: ./: Is a directory"

When I try to execute the file, for example "./ readability" is says "bash: ./: Is a directory". It just started doing this the past few days. I even tried running files that ...
Ryan N's user avatar
  • 1
0 votes
1 answer
85 views

readability pset2 multi error

I replaced semicolon with a coma as sugested erlier. I compile the code but when I enter the text to receive Grade 3 nothing happens, again anny sugestion. Thanks. #include <cs50.h> #include <...
Matrix's user avatar
  • 67
1 vote
2 answers
52 views

CS50 Readability compile error

Im trying to compile the program but keep getting this error message below: Can someone tell me what this means please. The carat arrow is supposed to be pointing at "char" and "ch&...
Lovely Locs's user avatar
1 vote
2 answers
293 views

pset2 - readability - grades slightly off

I have a problem that I have not been able to diagnose on my own or by perusing this stack overflow. The the tests are here. All of the index values are correct except for the grade seven sentence ...
m.ravetch's user avatar
0 votes
1 answer
112 views

Pset2 Readability Not Working

I need help in executing the program here. This is my program and when I execute it, it asks me for a text. I copy-pasted the first HOW TO TEST YOUR CODE "One fish. Two fish. Red fish. Blue fish.&...
Sam AG's user avatar
  • 1
0 votes
1 answer
116 views

Pset2 Readability: Counting words and sentences

whenever I try to run my readability code I always get that I have no words or sentences. Additionally, whenever I run my code the number of letters seems to include spaces eventhough I am using the ...
ac743's user avatar
  • 3
0 votes
1 answer
125 views

Sentence count stuck at 2 in readability

#include <stdio.h> #include <cs50.h> #include <ctype.h> #include <string.h> int main(void) { //Retrieve string of text from user string s = get_string("Text: &...
Liz-Sod497's user avatar
0 votes
1 answer
36 views

pset2 readability counting with global variables

I have been having some trouble forming a proper global function for CS50 pset2 readability. The code has no error after compiling but the index will not count. I'm not sure if the global counter ...
rebeccatechu's user avatar
0 votes
1 answer
301 views

PSET2 Readability - tests no passing

I am not sure what I am doing wrong. #include <stdio.h> #include <cs50.h> #include <ctype.h> #include <string.h> #include <math.h> int main(void) { //Create integers ...
Neri Esparza's user avatar
0 votes
1 answer
95 views

Pset2 Coleman-Lau Index Always Prints -15

I'm struggling with PSet 2 Readability. I don't want to cheat the answers because I am genuinely trying to learn how to think better and improve my logic. I so far have been able to get the letter ...
user5854648's user avatar
0 votes
1 answer
473 views

Pset2 Readability test fail "complex single sentence" Grade 9 instead of Grade 8

When using check50 or inputting the provided texts, my program passes all but one test; the "complex single sentence" test returns a Grade 9 instead of Grade 8 (Coleman-Liau index returns 8.785455 and ...
JoeH's user avatar
  • 15
1 vote
1 answer
18 views

I have tried and looked through my code but every output it prints is Before Grade 1. And it is compiling without errors

#include <cs50.h> #include <stdio.h> #include <string.h> #include <math.h> int main(void) { int l_count = 0; int w_count = 1; int s_count = 0; int L = ((float)...
Seun Adeyemo's user avatar