SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 4 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 11 Dec 2017 My Price 7.00

parameter and returns a dictionary, d, that indexes

USING PYTHON

13-Write a function named lineIndex that takes a file name, fName, as a parameter and returns a dictionary, d, that indexes the words in fName by line number, with the first line in fName being numbered 0.

Each word in fName should be a key in the returned dictionary d, and the corresponding value should be a list of the line numbers on which the word occurs. A line number should occur no more than one time in a given list of line numbers.

The file fName contains only upper and lower case letters and white space. Capital and lower case letters are different. That is, 'You' is not the same word as 'you'.

12-USING PYTHON

12-Write a function named mostFrequent that takes two parameters.1-inFile, a string that is the name of the input file and 2-outFile a string that is the name of output file.The input file exists when mostFrequent is called, mostFrequent must create outFile. The input File contains only lower cases letter and white space.The function mostFrequent identifies the letter(s) that appear most frequently on each line of the inFile and write them to corresponding lines of the outFile. If more than one letteron the line has the same frequency, they should each be written to outFile.Each letter should be written to the line only once.

 

13a-the letters a, e, i, o and u are vowels. No other letter is a vowel. Write a function named vowelCount() that takes a string, s, as a parameter and returns the number of vowels that scontains. The string smay contain both upper and lower case characters.

Question13b

Write a function named manyVowels() that takes a body of text, t, and an integer, i, as parameters. The text tcontains only lower case letters and white space. manyVowels() should return a dictionary in which the keys are all words in tthat contain at least i vowels. The value corresponding to each key is the number of vowels in it. For full credit, manyVowels() must call the helper function vowelCount() from Question 13a to determine the number of vowels in each word.

Input:

1. t, a text consisting of lower case letters and white space

2. i, a threshold number of vowels

Return: a dictionary of key-value pairs in which the keys are the words in t containing at least i vowels and the value of each key is the number of vowels it contains.

 

Using python 12-Write a function named repeatCount(). The function repeatCount() takes two string parameters: the name of an input file and the name of an output file. The function repeatCount() should read each line of the input file, identify the number of words on the line that occur more than once, and write that number to a line in the output file. A word should be considered to be repeated if occurs with different capitalization. That is, 'To' and 'to' are the same word. You may assume that the file contains only upper and lower case letters and white space; it does not contain any punctuation marks

Answers

(5)
Status NEW Posted 11 Dec 2017 01:12 PM My Price 7.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)