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
Len [333]
4 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]4 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
You are opening a store, and having a working website is an important part of your project plan. The company that started creati
Murljashka [212]
A should be the answer... not having the website will cause you to have to everything by call and things like that ... plz brainliest.
6 0
4 years ago
Your network consists of three sites and two domains, with some computers from both domains at each site. Each site has certain
Zinaida [17]

Answer:

Create three GPOs, one for each site, with the appropriate security settings. Apply the GPOs to the corresponding site, and enforce the GPO.

3 0
3 years ago
Please answer these questions! Will mark Brainliest!!
Sergio039 [100]

Answer:

1) bob behnken and doug hurley

2)yes

3) august

7 0
3 years ago
The ________ is made up of a series of tabs that organize the various buttons, drop-down lists, and galleries of options by a br
Nina [5.8K]

Answer:

ribbon

Explanation:

Ribbon is the space at the top of the programs like excel and word, where we can find a lot of options to do in our presentations, this ribbon is divided in other categories where we can find specific options like font, number, and styles, this options was implemented from 2007 and is still used today, in addition we can modify and add other components at the ribbon

8 0
3 years ago
If I had a tab open on my friends iPhone 7 Plus that I did not want him to see but his phone ran out of battery and I don't know
Vinvika [58]

Answer:

I'm sorry but I don't think there is a way. You should try to get the password out of him and then close it. Don't forget to clear the history.

Explanation:

4 0
3 years ago
Other questions:
  • What is the last step in conducting url search
    11·1 answer
  • One way to align and organize your table of contents is by using _______, which are dotted lines that precede your typed informa
    12·1 answer
  • An organization uses SAP financial management software to store accounting details and Microsoft CRM software to record customer
    12·1 answer
  • Your supervisor has asked you to set up a RAID hard drive array in a tower system, which has a motherboard that uses the B360 ch
    10·1 answer
  • The author of ""Cyber-psychopathy: What Goes On in a Hacker’s Head"" states that a crucial component of computer hacking lies in
    6·1 answer
  • ? Assessment
    12·1 answer
  • In 3-5 sentences describe whether or not files should be deleted from your computer explain your answer
    12·1 answer
  • How to shutdow computer
    7·1 answer
  • Does a 21.6v battery work with a 24 volt controller
    6·1 answer
  • What three best practices can help defend against social engineering attacks?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!