Questions tagged [readability]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

pset 2 readability problem help

In my program, the wordCount isn't always accurate and I can't for the life of me figure out why the phrase "lets go for a run.I like daffodils" in this order equals 7 words, when it's ...
Alan Shenoy's user avatar
0 votes
1 answer
39 views

my Pset 2 Readability is getting the wrong grade level

What am I doing wrong?! When I check my code with check50, I get this: :( handles questions in passage expected "Grade 2\n", not "Grade 3\n" So far, I haven't been able to fix ...
OnAnd17's user avatar
0 votes
1 answer
35 views

help with debugging readability from Pset2

I'm looking for some help with the readability problem from problem set 2. When I run debug50, I'm getting an error message for the text (see image). It seems that the body of the text is not being ...
AmyG's user avatar
  • 41
1 vote
1 answer
42 views

pset6 Readability Python - Getting right numbers but wrong grade

I am trying to figure out where my error is. When I run this program, all of the variables read correctly (in debug50), but almost none of the answers from check50 are correct. For instance, when I ...
Goonygoon84's user avatar
0 votes
1 answer
33 views

Issues with readability functions

I am having difficulty getting past creating the first function of my code, line 61. I have tried many different variations and I suspect that I am just not understanding a basic concept of the ...
Jeff's user avatar
  • 21
0 votes
1 answer
26 views

hey im on pset2 readability. i cant seem to get the right output. it is supposed to show letters= and words= but its not

#include <stdio.h> #include <cs50.h> #include <string.h> int count_letters(string text); int count_words(string text); int count_sentences(string text); int main(void) { // Get ...
Blissfully_Tensed's user avatar
0 votes
1 answer
57 views

is my code wrong or is one of the test text in cd50 readability is incorrect?

so i've been working on readability and i tested my code everything is working exept one thing one of the lines they give you to test your code give me an output of grade 8 while they say it's ...
gilboa binshtein's user avatar
0 votes
1 answer
18 views

Segmentation fault after typing in text when prompted. HELP!

Can you guys analyze my code. I am pure beginner so I am not really sure if I am doing this right. I want to know why am I receiving segmentation fault and if this code is in any way correct. I ...
NAUGHTIOUS MAXIMUS's user avatar
0 votes
1 answer
27 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
726 views

Readability CS50

I've coded this solution for the readability exercise of CS50 Week 2, but after three long days I really don't see where I went wrong. It compiles and calculates the right number of words, sentences ...
Guillermo Gil de Avalle's user avatar
0 votes
1 answer
36 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
19 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
126 views

readability, cs50 segmentation fault, core dump

Hi, I'm having trouble with this. Is there something wrong with my code line or should i just redo everything? #include <cs50.h> #include <stdio.h> #include <ctype.h> #include <...
Phạm Tú's user avatar
-1 votes
1 answer
75 views

Can't figure out why my code fails check50

I spent a huge amount of time tring to figure out why, and couldn't so far. Thanks in advance :)
Mohamed Hassan's user avatar
0 votes
1 answer
371 views

Readability lab: Counting letters

#include <stdio.h> #include <string.h> #include <cs50.h> int main(void) { string enterword = get_string("input: "); int t = strlen(enterword); printf("%i\n&...
Splendid Digital Solutions's user avatar
0 votes
1 answer
22 views

Char type while counting number of words in Readability project

#include <stdio.h> #include <string.h> #include <cs50.h> int main(void) { string enterword = get_string("input: "); int t = strlen(enterword); printf("%i\n&...
Splendid Digital Solutions's user avatar
0 votes
2 answers
43 views

Readability lab: Help counting no. of lines in text

#include <stdio.h> #include <string.h> #include <cs50.h> int main(void) { string enterword = get_string("input"); int t = strlen(enterword); printf("%i\n&...
Splendid Digital Solutions's user avatar
1 vote
2 answers
285 views

cs50 readability problem set 2

I was wondering if someone could help me out with my code for the readability problem set. I have another solution but I was trying to make each process for counting letters, words and sentences ...
Tressa Sharma's user avatar
0 votes
2 answers
119 views

PSET6 Readability "unsupported operand type(s) for *: 'float' and 'NoneType'"

I'm getting "unsupported operand type(s) for *: 'float' and 'NoneType'" error for line 34: "s = (100 / words) * sentences". Not sure what to make of this since count_sentences(text)...
General Noob's user avatar
0 votes
1 answer
48 views

PSET6 - Readability. When I am running my program it is showing me this error again and again

The error I am getting Traceback (most recent call last): File "/home/ubuntu/pset/pset6/readability/readability.py", line 46, in <module> main() File "/home/ubuntu/pset/pset6/...
Fatmah Faridi's user avatar
1 vote
1 answer
176 views

How should rounding be handled in pset6 readability?

I'm struggling to understand what sort of rounding needs to be implemented to produce the grade in [pset6 readability][1]. For the Harry Potter extract provided ("Harry Potter was a highly ...
Eystein Thanisch's user avatar
0 votes
1 answer
65 views

My program is not is not able to import strlen from string.h

I am working on problem set 6 - Readability (python). When I am compiling my code the following error keeps coming. Traceback (most recent call last): File "/home/ubuntu/pset/pset6/readability/...
Fatmah Faridi's user avatar
0 votes
1 answer
24 views

Why does my code count a '.' only at the end of a multi-word string, but not at the end of a single word string?

I don't want my code to count non-alphabetic characters. It doesn't if they are alone, or at the end of a single word string. Why does it count an extra character at the end of a multi-word string or ...
Lperino's user avatar
  • 14
0 votes
1 answer
37 views

CS50 Pset2 Readability Second Argument Not Compiling

#include<stdio.h> #include<math.h> #include<cs50.h> #include<ctype.h> //prototype for a custome function int letters, words, sentences(string text); int main(void) { // ...
mossburger55's user avatar
0 votes
1 answer
89 views

Pset 2, readability: is everything a float and rounding problems

I' at the very end of readability and am having trouble getting the math correct and rounding it. I'm getting the correct letters, words and sentences, but am getting wildly wrong values for the grade ...
David Mertz's user avatar
0 votes
1 answer
257 views

pset1 problem set 2 readability

I completed the code for pset1 problem set 2 readability as follows #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> int ...
Cristian Estevez's user avatar
0 votes
1 answer
80 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
0 votes
1 answer
47 views

Pset2 - Readability doesn t compile

#include <stdio.h> #include <string.h> #include <ctype.h> #include <math.h> int main (void) { string text = get_string("Text: "); float num_letters,...
tabacool's user avatar
0 votes
2 answers
52 views

CS50 - Readability Equation Error

First question here. I am having some issues with the index equation for the readability problem. The code compiles and runs, and I believe it counts the letters, words, and sentences correctly. As ...
sevo's user avatar
  • 3
0 votes
2 answers
137 views

Readability Wrong Output at Index around 7-8

I have been struggling with Week 2 Problem Set 2 Readability Question. At this point, I feel like I am stuck, and spend too much time just trying to fix one error. The code works perfectly except &...
Furkan Edizkan's user avatar
0 votes
1 answer
86 views

pset2- readability

While counting the number of sentences ( Pset 2: Readability) , how do we differentiate between exclamation marks within a sentence and those which are used to end a sentence ? This is my code: //...
Reba Philip's user avatar
0 votes
1 answer
94 views

Check50 problem with Readability

When I submit my readability code check50 says: Expected Output: Before Grade 1 Actual Output: Before Grade 1 Expected Output: Grade 16+ Actual Output: Grade 16+ Since my program outputs what is ...
MOMarty's user avatar
0 votes
1 answer
119 views

Receiving EOF when I execute check50 (Readability)

I keep getting EOF when I check50, but my program runs fine. It gives the correct output for every text input. I can not find a solution here. It looks fine, but when I run the check50 command I get ...
Martin Birkeland's user avatar
0 votes
1 answer
79 views

CS50 readability.c:31:1: error: expected identifier or '(' {

I keep getting this same error message readability.c:31:1: error: expected identifier or '(' { Please Help! I put my program below: #include <stdio.h> #include <cs50.h> #include <math.h&...
Lovely Locs's user avatar
0 votes
1 answer
230 views

String to Char in C

How can I convert a String to a Char in C? Please help. I am unable to do that and I need it urgently. I need it for readability.
Saara Luthra's user avatar
0 votes
1 answer
135 views

Pset6 Cs50 = Readability false output

I have been trying to complete readability python but on every result it is showing before Grade one from cs50 import get_string s = get_string("Text: ").strip() num_letters, num_sentences,...
Meet Purandare's user avatar
0 votes
1 answer
126 views

PSET6 - Readability: false grade output

from cs50 import get_string text = get_string("Text: ") letters = sentences = i = words = 0 length = len(text) while i < length: if text[i].isalpha(): letters += 1 //...
Agam Ario Wicaksono's user avatar
0 votes
1 answer
25 views

Readability for CS50 returning “Nan” value

I am fairly new to coding and im trying to complete Readability in Problem Set 2. I have coded how to count the letters, words, and sentences but now I am trying to make it calculate the grade level ...
Dre Johnson's user avatar
0 votes
1 answer
109 views

isalpha not counting

I am new to this and I'm doing the readability program. I'm using isalpha to count the letters and my program compiles but no matter what it says 0 and I can't figure out why. #include <cs50.h> #...
Dre Johnson's user avatar
0 votes
2 answers
43 views

Readability assignment, getting "Segmentation fault" message

It took me a while to be able to compile and run this program, and now I'm getting a "segmentation fault" message. What have I done wrong? Here's my code: #include <stdio.h> #include &...
isaac6's user avatar
  • 1
0 votes
1 answer
256 views

Readability CS50 Not counting the spaces

In my if statement I am trying to say, "if there is a space in strlen subtract that space then print strlen." My goal is to count only the letters that appear in the string and not the ...
kenn92's user avatar
  • 3
0 votes
1 answer
231 views

readability - resulting grade is incorrect

#include <stdio.h> #include <cs50.h> #include <ctype.h> #include <string.h> #include <math.h> int main(void) { string text = get_string("Text: "); ...
Tanya Pleau's user avatar
0 votes
1 answer
43 views

Pset 2 - Readability -> Wrong grade

I'm having problems with the Pset 2 problem: readability. The goal of exercise is to implement a program that computes the approximate grade level needed to comprehend some text using the Coleman-Liau ...
KP.cs50ai's user avatar
0 votes
1 answer
167 views

error: result of comparison against a string literal is unspecified (use strncmp instead) if(strncmp(i == " "))

I'm trying to write code for problem set 2, readability. I think I have it but I'm getting this error code and stuck on how to fix this. Here is my code if anyone could help that would be awesome! ...
zachary0994's user avatar
0 votes
1 answer
73 views

pset 2 Readability Segmentation Fault

I started working on readability and I am trying to figure out how to count the letters. I found a way but it includes all the characters so now I am trying to eliminate all the entries besides the ...
FoundABetterName's user avatar
0 votes
1 answer
40 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 ...
lehga's user avatar
  • 1
0 votes
1 answer
44 views

pset2 Readability: reading index being calculated incorrectly even though hard sentence, word and letter numbers are correct

The indexes come out sometimes too low,some times too high and I don't really understand why if the variable calculations come out right every time. Here's my code for it: //calculates average letters ...
paula.em.lafon's user avatar
0 votes
2 answers
103 views

PSET2: Readability code giving wrong grades

My Readability code keeps on creating the outputs of the wrong grade when I try to execute it. When inputting the text, 'When he was nearly thirteen, my brother Jem got his arm badly broken at the ...
stanloona's user avatar
1 vote
1 answer
531 views

What am I missing ? (pset2, readability)

The problem is that when i run check50 cs50/problems/2020/x/readability into the terminal, it says :( handles questions in passage Cause expected "Grade 2\n", not "Grade 3\n" Log ...
Ralph's user avatar
  • 13
0 votes
1 answer
63 views

Fatal error "segmentation fault" when trying to run program

My program readability.c compiles and gets input. It's supposed to return the number of letters in the input text. I'm getting this error instead of the answer. If you can help me you'll be welcome. ...
333PPP's user avatar
  • 29