Posts

Showing posts from July, 2022

Parts of Speech - Pronouns

Image
 What is a Pronoun? Pronouns Definition of a Pronoun: A pronoun is a word that replaces a noun (single word)  or replaces  anything functioning as a noun (noun clause , noun phrase) . Pronouns do the same job of nouns in the sentence. Examples on Pronouns I have a car . It is white. It is 2021 model.      (We used "it" in the second and third sentence to avoid repeating the noun "car".) My daughter's cat's name is " Candy ". She is white and she keeps playing all day long.      (We used "she" to replace "My daughter's cat".) What are Antecedents of Pronouns?  She likes blue color more than red . --> Who is She ? What if we did not mention the noun first? If we started with the pronoun, we will not know what does this pronoun refer to, right? Most of the time, yes, that's why we need to start with nouns and we call them Antecedents . Sometimes we don't need to start with nouns (if you start by "I"...

cs50 Week 2 Problem Set 2 Readability Solution

Image
CS50 Week 2 Problem Set 2 Readability Problem Set 2 - Readability In coding, problems have different ways to get to the solution. Below code is one way. Soon, we will be posting different codes. ** Remember: Try to change some things in the code before submitting it in order to avoid being rejected as Harvard academic honesty. The Solution: #include <cs50.h> #include <stdio.h> #include <string.h> #include <math.h> #include <ctype.h> int main(void) {     // inintiate needed variables     string text = get_string("TEXT: ");     int letters = 0;     int words = 1;     int sentences = 0;     for (int i = 0; i < strlen(text); i++)     {         if (isalpha(text[i]))         {             letters++;         }         else if (text[i] == ' ')         {   ...