Questions tagged [readability]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
45 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,...
1
vote
2answers
115 views

CS50 Readability solved it but I feel there is something wrong

I did Readability problem set but I feel it is wrong to initialize words to 1 but it is the only way to satisfy the requirement since the first the words are counted by space so the last word can not ...
0
votes
1answer
47 views

Pset2 Readability undeclared identifier error message

I am attempting to make my program but everytime I try, it tells me I have not identified my variable "i" eventhough I identified it as an integer above. Does anyone know what I'm doing ...
0
votes
1answer
57 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
54 views

Readability compiling issue

Readability (Problem Set 2) #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> // Letters detects letters // Words detects ...
0
votes
1answer
22 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) { // ...
0
votes
1answer
30 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/...
0
votes
1answer
22 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 ...
1
vote
1answer
51 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 ...
0
votes
2answers
63 views

Pset 6 readability index constantly returns negative number

I'm having trouble getting an accurate value of the index. The output ends up being a negative number so the result always turns out as before grade one. I'm not sure where I went wrong from cs50 ...
0
votes
1answer
15 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/...
0
votes
1answer
26 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 ...
0
votes
1answer
60 views

Having problems producung the correct result using the text extracts provided by CS%). I cant see where it goes wrong when finding the correct grade

CODE: #include <cs50.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <math.h> int main(void) { // DECLARE LETTER, WORD & SENTENCE COUNT int ...
0
votes
1answer
19 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! ...
0
votes
1answer
19 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 ...
0
votes
0answers
18 views

Pset6 Readability Python: no output

from cs50 import get_string, get_int import sys def main(): statement = get_string("Text: ") count = len(statement) no_words = count_words(statement) no_letters = ...
0
votes
1answer
450 views

Readability wrong grade

I am right with other string but this one=> 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 ...
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
1answer
18 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 ...
0
votes
1answer
157 views

PSet2 doesn't match with Gradebook

I started the course on the 7th of January of 2020. I've done PSet0 and PSet1 with no problem. Now I'm in the middle of PSet2. I've done Caesar and submitted it. It appears in my Gradebook. Now I've ...
0
votes
2answers
39 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 ...
0
votes
1answer
31 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 ...
0
votes
1answer
278 views

pset2 readability. im getting 8 instead of 7th gread

Anyone knows why i get this error? :) readability.c exists :) readability.c compiles :( handles single sentence with multiple words expected "Grade 7\n", not "Grade 8\n" :) handles punctuation ...
0
votes
1answer
211 views

can't get my readability program to work on all conditions- rounding issue?

My python readability program is not giving me the correct grade level for all of the checkers. specifically: "In my younger and more vulnerable years my father gave me some advice that I've been ...
0
votes
1answer
185 views

Readability: facing an error "pointer cannot be cast to type 'float'

This is my code and I'am stuck at the last stage where index to be calculated. HOw to fix that? Error pops up: ( readability.c:50:42: error: pointer cannot be cast to type 'float') +++++++++++++++++++...
0
votes
1answer
25 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
189 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
29 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 <...
0
votes
1answer
35 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,...
0
votes
1answer
118 views

Pset 2 Readability

What's going wrong? I think I've got it figured out but I'm unable to compile the program and print out what I want it to say.
0
votes
2answers
31 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 &...
0
votes
1answer
146 views

Readability check50 error

#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <math.h> // Letters detects letters // Words detects spaces // Sentences detects ...
0
votes
2answers
28 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 ...
0
votes
1answer
23 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: //...
0
votes
1answer
22 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 ...
0
votes
1answer
31 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&...
3
votes
3answers
276 views

Can't compile readability in cs50 IDE

I'm trying to do the readability exercise for week 2 in the cs50 IDE and am unable to compile my program. I followed the steps below exactly, but am getting the error message depicted below the steps ...
0
votes
1answer
162 views

PSET2 Readability, most of my code works as expected, but one passage provided below

include include include include include int main(void) { // Ask user for input string s = get_string("Text:"); // variable to store letter, word, and sentence count int letterCount ...
0
votes
1answer
32 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.
0
votes
1answer
43 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 //...
0
votes
1answer
16 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 ...
0
votes
1answer
25 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> #...
0
votes
2answers
37 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 &...
0
votes
1answer
41 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 ...
0
votes
1answer
33 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: "); ...
0
votes
1answer
27 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 ...
0
votes
1answer
42 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 ...
0
votes
1answer
56 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. ...
1
vote
1answer
374 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 ...
0
votes
1answer
111 views

Week 2 Readability Letter Count

I am able to figure out the number of letters and spaces (the answer is 300) with the code below. How do I write a command to exclude the spaces? A hint would be appreciated. Thank you. ''' #...