Questions tagged [cs50readability]
The cs50readability tag has no usage guidance.
19
questions
0
votes
2answers
32 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&...
1
vote
2answers
74 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 ...
0
votes
1answer
23 views
Pset2 Readability error with “else” statement
readability.c:28:9: error: expected expression
else:
Shown above is the error I am getting. If anyone would point me to what exactly I am doing wrong. that would be great. Bellow, I will add my ...
0
votes
0answers
29 views
pset6 Readability Python: Calculated grades too high
My code below returns incorrect grades. Often it is even two grades higher than it should be. Any ideas where is the mistake?
letters = words = sentences = 0
for char in text:
if char.isalpha():
...
0
votes
1answer
36 views
Someone familiarized with pset2's Readability. I'm stuck here
I'm not asking for the solution, but I'm stuck in getting the integer of total letters. It doesn't compile but it's close, errors say it's something with isalpha. As it doesn't compile, I can't even ...
0
votes
2answers
35 views
Readability counting letters advice
I can't get to compile the readability program second part, that is counting the letters and outputting an integer. I've tried everything. I'm not asking for a solution, but for a hint at what my ...
0
votes
1answer
19 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: &...
0
votes
1answer
23 views
Readability pset: Please look at my code?
the program runs quite well but not accurate when check50 is applied
#include <stdio.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include <cs50.h>
int ...
0
votes
1answer
149 views
Pset2 Readability. I am starting to do readbility and for some reason the code i wrote this far seems not to be compiling properly
My for loop doesn't seem to be executing. When i run the program it seems for loop is been skipped. Can someone please help me out.
#include <stdio.h>
#include <cs50.h>
#include <string....
0
votes
1answer
91 views
Readability problem week2. Grade 7 example sentence returns grade 8
I have a probelm with the readability problem set. When I run check50, I always get an error on the one sentence grade 7 check. ":( handles single sentence with multiple words expected "Grade 7\n", ...
0
votes
1answer
43 views
pset2 Readability - Wrong L and S
I'm struggling with the final calculation of the grade that results from the wrong value of L and S.
Example:
"One fish. Two fish. Red fish. Blue fish" counts letters: 29, words: 8, sentences: 3
...
0
votes
0answers
78 views
PSET Make Readability
i am having some problems trying to execute make readability. Can you help me? Thanks in advance!
0
votes
2answers
64 views
pset2 readability. cannot compile although int is declared and code is complete. could someone please look into?
#include<cs50.h>
#include<stdio.h>
#include<string.h>
#include<ctype.h>
#include<math.h>
int main (void)
{
string text=get_string("text:\n");
// to count ...
0
votes
1answer
49 views
Why am I receiving a linker error on my function when it is defined in the file?
I'm in week 2 of cs50 and am currently working on the Readabilty problem. I've written a function named count_letters under main and have declared it at the top of the programm. However when I attempt ...
0
votes
1answer
174 views
Having issues creating readability and readability.c directory and file
I am a beginner and have zero knowledge of coding.
Right now, I am working on problem set 2, but something is wrong and cant properly create readability.c and readability.
This is what I am doing:
...
0
votes
1answer
380 views
How to get my code to print the right letter count?
I wrote some code to print out the required number of letters inputted into a given text. For some reason after 9 letters it seems to increment by one and will slightly overshoot the number of letters ...
0
votes
1answer
52 views
no rule to make target pset2
I am currently working on the readability problem in pst2. I followed the 'getting started' instructions to create and open the file in the readability directory, however, I am still getting a "make: *...
0
votes
1answer
76 views
Segmentation fault in Readability from pset2
Can someone please help me in understanding the mistake I am doing? I've got the segmentation fault in the terminal window after running the program and providing the text.
Here is my code
...
and ...
0
votes
1answer
83 views
Readability word count miscalculation
So far I can print the number of letters without issue but when it comes to printing the number of words I cannot get it to accurately calculate. It only returns the value of one which I've predefined....