1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sergio039 [100]
3 years ago
15

8.17 Lab: Strings of a Frequency Write a program that reads whitespace delimited strings (words) and an integer (freq). Then, th

e program outputs the strings from words that have a frequency equal to freq in a case insensitive manner. Your specific task is to write a function wordsOfFreqency(words, freq), which will return a list of strings (in the order in which they appear in the original list) that have a frequency same as the function parameter freq. The parameter words to the function wordsOfFreqency(words, freq) should be a list data structure. If two strings in the list words contain the same sequence of characters but are different case, they are considered the same. For example, we will consider the strings UCONN and uconn to be the same. Test cases 1-4
Computers and Technology
1 answer:
WITCHER [35]3 years ago
4 0

Answer:

def wordsOfFreqency(words, freq):

 text1 = "Apple apPLE mangO aPple orange Orange apple guava Mango mango"

 words = []

 words1 = []

 words1 = text1.split()

 words = [x.upper() for x in words1]

 freq=[words.count(w) for w in words]

 print(dict(zip(freq,words)))

 return words

def main():

wordsOfFreqency(words, freq)      

if __name__=="__main__":

main()    # call main function

Explanation:

This will print the list of strings as per its word frequency.

Output is :

{4: 'APPLE', 3: 'MANGO', 2: 'ORANGE', 1: 'GUAVA'}

You might be interested in
Explain different users of computer in briefly?​
goldfiish [28.3K]

Answer:

The question is invalid; there are many types of computer user. Why on earth do you think there are five?

From the top of my head.

Casual- someone at home browsing the web, reading email.

IT Consultant. Advising people.

Software developer- writing software

Secretary - manages email for a company

Academic. Writing research papers.

Monitors. Monitor a computer system.

That’s six off the top of my head. There are probably a dozen more. So why do you think there are five?

3 0
2 years ago
To print a range of cells in the active worksheet, click___ in the settings in print gallery.
trapecia [35]
<span>print entire workbook</span>
4 0
3 years ago
What is the disadvantages of using proprietary software
Snezhnost [94]

Answer:

Cost. One of the biggest drawbacks of any proprietary software is the licensing fee. ...

Developer Support. ...

Security Issues. ...

Customization.

Explanation:

5 0
3 years ago
Read 2 more answers
Question 1 (1 point)
S_A_V [24]

Answer:

I'm not 100% on the answers . . .

Explanation:

1. A, 2. C, 3. D, 4. A, 5. D, 6. A & B, 7. False, 8. D, 9. D, 10. D

7 0
2 years ago
Read 2 more answers
write a program which prompts the user for a celsius temperature, convert the temperature to fahrenheit, and print out the conve
JulsSmile [24]

print("——OR——") Input ("Temperature value in degree Celsius:"), celsius 2 = float) Celsius 2 = (Fahrenheit 2 * 9/5) + 32; print the result.

The user's input is taken. Enter the temperature in celsius by typing it into the input box. Fahrenheit is equivalent to (celsius multiplied by 1.8) + 32 print(str(celsius)+ "A degree in Celsius is equal to a " + str(fahrenheit)+ " degree in Fahrenheit. The change from C to F is therefore 100/180, or 5/9. It is 180/100 or 9/5 from F to C. As a result, the conversion yields °F = °C (9/5) + 32. As a result, the equation for changing from the Celsius to Fahrenheit scale becomes °F = °C (9/5) + 32. To convert from degrees Fahrenheit to degrees Celsius, do the inverse calculation: subtract 30 from the degrees Fahrenheit reading, then multiply the result by two to obtain the degrees Celsius reading.

Learn more about conversion here-

brainly.com/question/13163755

#SPJ4

6 0
9 months ago
Other questions:
  • ________ is typically used as the last string of letters in the name of a website. Group of answer choices the name of the indiv
    13·1 answer
  • Write a program that implement a bubble sort ?
    5·1 answer
  • What is an Operating System ??
    7·1 answer
  • Create a spreadsheet that lists the ten currencies you chose. For each currency, enter an amount and create a
    12·1 answer
  • 2. Discuss CORBA functions<br><br>​
    6·2 answers
  • Bro i swear whenever i play fortnite duos, they ask you if you don't have a mic, if you don't then they just leave, so annoying
    15·2 answers
  • When you check your hard drive to see how much space is available, you are checking your
    15·1 answer
  • The cost to ship a package is a flat fee of 75 cents plus 25 cents per pound. 1. Declare a const named CENTS_PER_POUND and initi
    12·1 answer
  • Coffee shops worldwide throw away billions of paper cups each year. Discuss
    9·1 answer
  • Which of the following declares an abstract method in an abstract Java class?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!