0% found this document useful (0 votes)
5 views3 pages

Computer Programming Assignment

The document outlines a computer programming assignment with three questions. The first question requires writing a program to check if a word is a palindrome, the second involves counting word frequencies in a string, and the third focuses on removing stop words from a string without using external packages. Each question prompts for code and an explanation of the code written.

Uploaded by

yisakdawit70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Computer Programming Assignment

The document outlines a computer programming assignment with three questions. The first question requires writing a program to check if a word is a palindrome, the second involves counting word frequencies in a string, and the third focuses on removing stop words from a string without using external packages. Each question prompts for code and an explanation of the code written.

Uploaded by

yisakdawit70
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Computer Programming Assignment

Question 1: Checking if a word is palindrome. You need to write a program that uses loop to check if a given
string is a palindrome.

E.g. The word noon is a palindrome. A palindrome have the same spelling in reverse.

Write the explanation below.


Question 2: This question includes a reading assignment. Read about dictionary from your text
book. The program you are going to write below counts the words in a given string where the key
is the word and the value is the frequency of the word in the sentence.

Eg. I ate an apple.

“I”:1,

“ate”: 1

“an”: 1

“apple”: 1

Write the program below

Write the explanation of your code


Question 3: Write a program that removes stop words such as the, is, an, a, and so on. From a
string. Use this link (https://countwordsfree.com/stopwords) to use at least 10 stop words that
you are going to remove the string.

Note: The use of external packages such as NLTK is not allowed

Write your code here

Write the explanation of the code here

You might also like