Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USING PYTHON 2-the following lower cases letter are written partly below the baseline:g,j,p,q,y. We say that these letter has a descender.Write a function named hasDescender

USING PYTHON

2-the following lower cases letter are written partly below the baseline:g,j,p,q,y. We say that these letter has a descender.Write a function named hasDescender () that returns a list of words in a string in which at least one letter has a descender.A word should appear in the return list at least once, no matter how many letter in it have descenders and no matter how many times the word occurs in the input string. You may assume that the input consists of only lower case letters and spaces. no punctuaction or upper case letters. the order in the return list doesnt matter.

input:a string s that consists of words ,separated by spaces and return: a list of words in s that contain at least one descender

3-write a function named wordLenghts() that counts the frequency with which words of different lenght occur in an input file and then returns a dictionary that contains this information.it will take one parameter : a string that is the name of an input file that exist before wordLenghts is called. you may assume that the input file is in the current working directory.Assume that the input file contains only lower case letters and endlines (no capital letter or punctuaction). Each occurence of a word in the input file should be counted .Duplicate words should be counted twice, tripicals three tines and so on(word lenghts are keys and the count of the words of that lenght is the corresponding value.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Medical Image Databases

Authors: Stephen T.C. Wong

1st Edition

1461375398, 978-1461375395

More Books

Students also viewed these Databases questions

Question

305 mg of C6H12O6 in 55.2 mL of solution whats the molarity

Answered: 1 week ago