answer.
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
Len [333]
2 years ago
6

A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance for a fi

le. The program should output the unique words and their frequencies in alphabetical order. Variations are to track sequences of two words and their frequencies, or n words and their frequencies. Below is an example file along with the program input and output: example.txt
Computers and Technology
1 answer:
neonofarm [45]2 years ago
3 0

Answer:

Python file with appropriate comments given below

Explanation:

#Take the input file name

filename=input('Enter the input file name: ')

#Open the input file

inputFile = open(filename,"r+")

#Define the dictionary.

list={}

#Read and split the file using for loop

for word in inputFile.read().split():

  #Check the word to be or not in file.

  if word not in list:

     list[word] = 1

  #increment by 1

  else:

     list[word] += 1

#Close the file.

inputFile.close();

#print a line

print();

#The word are sorted as per their ASCII value.

fori in sorted(list):

  #print the unique words and their

  #frequencies in alphabetical order.

  print("{0} {1} ".format(i, list[i]));

You might be interested in
John downloaded the manual for his TV, called manual-of-tv.pdf, from the manufacturer's website. After he clicked twice on the d
wariber [46]

Jhon must download third party pdf viewer softwares to open the .pdf file.

For example

Adobe Acrobat Reader

Must click thanks and mark brainliest

4 0
2 years ago
Assume the user types in 7 and 10. What is output by the following?
Marianna [84]

Answer:

Enter a number: 7

Enter a number: 10

Traceback (most recent call last):

 File "main.py", line 3, in <module>

   print (numi + num2)

NameError: name 'numi' is not defined

Explanation:

The typo in the print statement causes a run-time error, where obviously num1+num2 was expected, and an output of 17.

3 0
2 years ago
Splunk In most production environments, _______ will be used as the source of data input?
Wittaler [7]

Answer: Forwarders

Explanation:

Splunk is defined as the software technology which helps in organization of applications, examining and monitoring of the data and information analytics.It performs the operation of indexing, processing and gathering to produce graphs, alert ,report etc .

  • Forwarders are the component of Splunk software that gathers the information and transmit it to the Splunk clod for further analysis and processing .It is considered as the reliable method for input of data.

6 0
2 years ago
The symbol asterisk(*) in a select query retrieves​
Natali [406]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The symbol asterisk (*) in a select query retrieve all result of column in the table. For example, table named "employee" has three column such as <em>id, name, address</em>.

To apply the symbol asterisk (*) in select querry select all the columns in the result.

for example:

select * employee;

this query statement selects all columns of table "employee" in the result.

3 0
2 years ago
Health care organizations must strictly comply with HIPAA regulations which require these organizations to maintain proper secur
Marrrta [24]

Answer:

b. Unauthorized access to organization-owned workstations

Explanation:

Base on the scenario been described in the question, the option the risks would most directly violate HIPAA compliance if compromised is Unauthorized access to organization-owned workstations

Ethical health research and privacy protections both provide valuable benefits to society. Health research is vital to improving human health and health care. Protecting patients involved in research from harm and preserving their rights is essential to ethical research. For the reasons, there certain risk they cannot take, but in this case, the risk they are will to take is the been mentioned.

7 0
2 years ago
Other questions:
  • Which of the following statements is not true about proper tire care? a.If you see a wear bar across the width of the tread whil
    14·2 answers
  • 1. Accessing calendars, contact information, emails, files and folders, instant messages, presentation, and task lists over the
    12·1 answer
  • Write the 8-bit signed-magnitude, two's complement, and ones' complement representations for each decimal number: +25, + 120, +
    11·1 answer
  • Locker doors There are n lockers in a hallway, numbered sequentially from 1 to n. Initially, all the locker doors are closed. Yo
    15·1 answer
  • Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n
    7·2 answers
  • Information is stored on a compact disk in a coded pattern of tiny pits arranged in a track that spirals outward toward the rim
    6·1 answer
  • Determining the Services Running on a Network Alexander Rocco Corporation has multiple OSs running in its many branch offices. B
    10·1 answer
  • Janeal spends her day looking at the stock and bond markets and evaluating how the portfolios of the businesses she serves will
    5·1 answer
  • #Write a function called string_finder. string_finder should #take two parameters: a target string and a search string. #The fun
    14·1 answer
  • The word “computer” has become associated with anything related to screens and keyboard. However, these are not the only parts t
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!