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
Please help me solve am wai...​
Ann [662]

Answer:

what the hell

Explanation:

6 0
3 years ago
¿dispositivos de hardware Que permite identificar la huella digital registrada por el usuario?
docker41 [41]

Answer:

Lector de huellas dactilares

Explanation:

Un lector de huellas dactilares funciona tomando la imagen de los valles lineales con curvas y las crestas de la huella dactilar a medida que se enrollan las extremidades frontales de los dedos (falange distal) o se utilizan para tocar la huella dactilar que funciona de forma óptica, térmica, tecnología capacitiva o ultrasónica.

Sin embargo, debido a las irregularidades en la percepción del dispositivo sensorial de huellas dactilares que funciona por contacto entre el dedo y el sensor cada vez que el dedo se presiona sobre la superficie de detección, se han desarrollado tecnologías de escaneo de huellas dactilares 3D sin contacto para capturar la imagen de una persona. huella digital cuando sea necesario.

3 0
4 years ago
The data model shows the_______structrue of database.​
Kay [80]

The data model shows the <u>rows and columns</u> structrue of database.

6 0
3 years ago
The clerk ordered three ribbons, 12 markers, and 15 erasers.
Arada [10]

17 is in all okay my friend

8 0
3 years ago
1. Encrypt this binary string into cipher text: 110000. Include in your answer the formula the
puteri [66]

Answer:

Encrypt this binary string into ciphertext: 110000. Include

in your answer the formula the decoder would use to decrypt your cipher text in the format (coded answer) x N mod (m) = Y

-Decrypt this ciphertext into a binary string: 106

Now that you can see how public and private keys work in a real-world scenario, please explains how it works for computers and internet communications in relation to cybersecurity.

Explanation: ……………..

6 0
3 years ago
Other questions:
  • Which description best describes how mass spectroscopy is useful in the field of forensic toxicology
    6·1 answer
  • Modify the definition of the throttle class on page 35, to create a new throttle ADT, which allows the user of the ADT to specif
    6·1 answer
  • Write program statements to determine the fewest number of bills needed to represent a total dollar amount.
    11·1 answer
  • Draw a logic circuit for the function F = (A + B)(B + C)(A + C), using NOR gates only. ​
    9·1 answer
  • What is an infodemic?
    10·1 answer
  • Which command will provide us with a list of the available internal commands (commands that are part of Command Prompt, such as
    7·1 answer
  • When memory allocation is ____, it means all portions of the program and OS are loaded into sequential locations in memory.
    15·1 answer
  • A large number of genetic codes are stored as binary values in a list. Which one of the following conditions must be true in ord
    5·2 answers
  • Which characters are used in hump notion?
    12·1 answer
  • Windows organizes the folders and files in a hierarchy, or ______​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!