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
valentinak56 [21]
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.
Computers and Technology
1 answer:
romanna [79]4 years ago
8 0
F = "HELLO HELLO HELLO WHAT ARE YOU DOING"
myDict = {}
linenum = 0

for word in f.split():
if not word in myDict:
myDict[word] = []

myDict[word].append(linenum)


print "%-15s %-15s" %("Word", "Frequency")
for key in sorted(myDict):
print '%-15s: %-15d' % (key, len(myDict[key]))
You might be interested in
Write a program that checks whether a positive number given by an input from the user is greater than 5 and less than 20 with ja
Alona [7]

Answer:

Program written in Java is as follows

See comments for explanations

import java.util.Scanner;

public class CheckRange {

public static void main (String [] args)

{

// This line allows the program accept user input

Scanner input = new Scanner(System.in);

//This line declares variable for user input

int num;

//This line prompts user for input

System.out.print("Number: ");

//This line gets user input

num = input.nextInt();

/* The following if statement checks if the user input is greater than 5 and less than 20 */

if (num > 5 && num <= 20)

{

/* This line is executed if the above condition is true */

System.out.print(num+" is greater than 5 and less than 20");

}

else

{

/*If the condition is not true, this line is executed*/

System.out.print(num+" is not within specified range");

}

// The if condition ends here

}

}

5 0
4 years ago
Multiple boolean expressions can be combined by using a logical operator to create ________ expressions.
Licemer1 [7]
<span>Boolean expressions can be combined by using a logical operator to create compound expressions. A boolean expression is an expression that takes into account and evaluates specific data, which is in the form of true and/or false. A compound expression is merely a statement of expressions.</span>
8 0
3 years ago
Jerry suspects that information about his Internet usage was sent to external websites without his knowledge. He is wary about t
balu736 [363]
I would say some kind of anti cookie software. Cookies are what the websites store to track info about you and your preferences. If you blocked their data collectors or turned of cookies for websites, you would likely stop getting ads and newsletters.
3 0
3 years ago
Suppose Alice uses the RSA system with a very large modulus n for which the factorization cannot be found in a reasonable amount
Yuliya22 [10]

Answer:

Encryption method security:-

  • Encryption method representing each alphabetic character as an integer between 0 and 25.
  • Now, apply RSA algorithm for each integer is not an efficient secure encryption method.

Explanation:

  • Let consider alphabetic characters set {A, B... Z} .
  • Each alphabetic character forms a set of message block values M={0,1,2...,25).
  • From encryption method the corresponding cipher text block value C = {0e mod n,1e mod n, 2e mod n,..., 25e mod n}.
  • Then, compute the cipher text with knowledge of Bob's public key;
  • If the public key is generated, then possibility to decrypt the cipher text to plain text.
  • The generated public key is easily calculated by everyone and security is lost.
  • Therefore, the encryption method is not secure.

Encryption method is not secure, Most efficient attack against this method:-

  • Now, compute the encryption message with the function Me mod n for all the possible values of M.
  • This is the most efficient attack against the scheme in encryption method.
  • Then, create a look-up table with cipher text as an index to the corresponding plain text as a value for appropriate location in the table.
4 0
3 years ago
The contains the computer's "brain," the central processing unit (CPU).
baherus [9]

Answer:

Inside the computer case, on the motherboard. Hope this helps!

Explanation:

5 0
4 years ago
Other questions:
  • Write the definition of a function named printpoweroftwostars that receives a non-negative integer n and prints a line consistin
    9·1 answer
  • Very often in data science, we are interested in understanding how values change with time. Use np.diff and np.max (or just max)
    13·1 answer
  • Which device stores data only temporarily, and only when the computer is running?
    12·1 answer
  • Dfd symbols are referenced by using all ____ letters for the symbol name.
    9·1 answer
  • What company or individual is responsible for developing the linux operating system?
    7·1 answer
  • Which of these statements describes the difference between binary and decimal numbers?
    11·2 answers
  • Help me with A,b and c
    11·1 answer
  • Which is the purpose of adding B-Roll footage to a sequence?
    10·1 answer
  • Write the following abbreviations in full next to the question number
    15·1 answer
  • What is utility Software​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!