Questions tagged [readability]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 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
42 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
58 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 ...
0
votes
1answer
30 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
35 views

pset2 Readability test question

This is what I have so far. I realized that when counting letters there are more symbols you must exclude, but I am not sure how to do that. Also, my program isn't running for some reason and I am not ...
0
votes
2answers
19 views

Why doesnt this code function?

I want to allow the user to put some text after a place holder via a printf like: Text: And then I want to be able to count the letters in the string. int main(void) { string text = get_string("...
0
votes
1answer
269 views

cs50 question. Pset2 Readability

hi i need help in making Readability. i get an error when i put in make readability. this the error i get. $ make readability clang -ggdb3 -O0 -std=c11 -Wall -Werror -Wextra -Wno-sign-compare -Wno-...
1
vote
2answers
66 views

My Coleman-Liau index gives the wrong answer

the program seems to be running fine but I don't know what went wrong in the index, it just doesn't give the right answer. #include <cs50.h> #include <stdio.h> #include <string.h> #...
0
votes
2answers
41 views

readability errors

I keep getting errors on the int i. idk what's wrong with my code #include <stdio.h> #include <cs50.h> #include <math.h> #include <string.h> int main(void) string text=...
1
vote
2answers
51 views

Hey. Please help me find my mistake. The number of words in my sentences is not counted properly

I tried using debugger but could not figure out where I went wrong. please help #include <stdio.h> #include <cs50.h> #include <string.h> #include <math.h> int main(void) { ...
0
votes
1answer
158 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
120 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 ...
0
votes
1answer
67 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 ...
0
votes
1answer
61 views

Pset2 readability

im trying to write this code in a particular way but my programme seems to keep getting the letter counts wrong. running debug 50 it seems that the bool i have created (letter) does not change from ...
0
votes
1answer
451 views

Pset 6 Readability returns higher than expected grade

My code is right below I am unable to find the issue because my C code for readability was basically the same(except syntax and formatting of course!) and it was working perfectly. This Python code is ...
0
votes
2answers
54 views

pset2 readability. The brackets are in the wrong place but I can't figure out where they should go to make the program work correctly

include include include include include include int letters = 0; int words = 0; int sentences = 0; int main(void) { string text = get_string("Text: "); for (int i = 0, len = strlen(...
0
votes
1answer
271 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 ...
0
votes
1answer
609 views

Incompatible pointer to integer conversion passing 'int on functions

im new to coding and currently working on pset2, readability, and I keep getting this error and can´t find a way to fix it. #include <cs50.h> #include <stdio.h> #include <math.h> #...
0
votes
1answer
49 views

Copying an array (string) to new array after light mutating (pset2 readability)

I'm working on the readability task in pset2. I've made a new function which is going to count each letter in a string. What I want to do, is to get a user's input string, save it in a variable text ...
0
votes
2answers
2k views

pset6 Readability python: ugly code

I want to find the number of sentences of a text. so I use: n_sentence = text.count('.') + text.count('!') + text.count('?') It's working and it's really ugly. I've read the .count method but I ...
0
votes
1answer
52 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
2answers
65 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
72 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
141 views

help with PS 2 Readability

Need help! Newbie alert over here - Readability program compiles fine, and print a return message, but I can't figure out why i keep getting the wrong grade number. Seems letter, word and sentence ...
0
votes
1answer
81 views

Why is my (readability.c) file in ~/.c9/metadata/environment/readability/ instead of ~/readability?

I'm doing pset 2 and did the following in the CS50 IDE (copied directly from my terminal): ~/ $ cd ~/ $ mkdir readability ~/ $ cd readability ~/readability/ $ open readability.c and I couldn't find ...
0
votes
1answer
59 views

Problem Set 2 readability check function returning false negatives

So I understand I have a math error in this code. I assume it is a rounding error which I will eventually get to. In either case, many times I do return the correct grade level but the check50 ...
0
votes
1answer
321 views

Readability in C passes tests on instructions page but when submitting, only 2/11 pass

I've written all of my code and tested that the letter, sentence and word output is counting correctly, which it seems to be. I even tested with all of the sentences on the instructions page and that ...
0
votes
1answer
640 views

pset6 (readability) score just 31% upon submitting eventhough program outputs are fine

My readability program seems to work perfectly and since the output matches all of the outputs for the given inputs in the problem specification. However, when I submit my program, I only receive 31%. ...
0
votes
1answer
65 views

Readability program printing the whole sequence of a counted letter/number/word, rather than just the sum

I have written the program for readability to count the letters, words, and sentences and it does that. However, when printing the counted letters, words, sentences it does not just give me the total ...
0
votes
1answer
376 views

CS50 Readability - Inconsistency in results

This is my 1st post here. I am taking CS50 and I am stuck trying to figure out why the results for this weeks problem set are delivering inconsistent results. My code is below. It passes most of the ...
0
votes
1answer
134 views

pset2 Readability variables not updating

On pset2 Readability and for the life of me I can't figure out why my variables are not updating. Whenever I try to print the "letters", "words" and "sentences" variables to screen to debug, it seems ...
0
votes
1answer
600 views

Failure in Readability code

I'm having an issue with my code for pset2, Readability. My code so far is: #include <cs50.h> #include <stdio.h> #include <string.h> #include <ctype.h> int main(void) { ...

1
2