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
sesenic [268]
3 years ago
5

Jamal wants to write a program that will find the 10 most common words in Romeo and Juliet. Which of the following constructs wi

ll be most helpful?
A. counter module

B. while loop

C. for loop

D. mean module
Computers and Technology
1 answer:
arlik [135]3 years ago
6 0

Answer:

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

Explanation:

The correct answer to this question is A: counter module.

Counter module in python or Python counter is a container that holds the count of each of the elements present in the container. It is a sub-class available in the dictionary class. Jamal can use this module in Python to write a program that will find the 10 most common words in Romeo and Juliet.

Other options are not correct because:

While loop: while loop only iterates its body until a specific condition is met. For loop is used to iterate to a pre-specified condition and iterate until the condition is reached. While the mean module of Python is used to calculate mean and average.

You might be interested in
Modify the statistics program from this chapter so that client programshave more flexibility in computing the mean and/ or stand
vampirchik [111]

Answer and Explanation:

Using Javascript:

function mean(nums){

var array_numbers= new array(nums);

var meanofNums= array_numbers.reduce()/array_numbers.length;

Console.log(meanofNums);

}

Function Std(nums){

var OurArray= new Array(nums);

var meanOfnums= mean(nums);

var i;

for(i=0; i<=OurArray.length; i++){

OurArray[i]= OurArray[i]-meanOfnums*OurArray[i]-meanOfnums;

}

var al_stdOfnums= OurArray.reduce()/OurArray.length;

var stdOfnums= Math. sqrt(al_stdOfnums);

Console.log(stdOfnums);

}

function meanStdDev (nums){

mean(nums);

Std(nums);

}

/*From the code above, we have defined functions and used them in the last function definition meanStdDev (nums), making for code reusability. In defining the functions, we have followed the formulas for calculating mean and standard deviations and implemented in that order. Notice how we used a for loop in std(nums) function definition to iterate through the elements of the array nums, squaring each value and reassigning a new value for each element(using index value) in the array. We then added these values in array using reduce method, dividing by array length and square rooting the value using the math object method sqrt().*/

8 0
3 years ago
Python Project Worksheet
natima [27]

Answer:

I will do it and send it in a pic

Explanation:

give me a sec

4 0
3 years ago
As a twist on the Hello World exercise, you are going to be the end user of the Hello class. This class is designed to greet the
Flura [38]

Answer:

Here is the Hello class:

public class Hello { //class name

     private String name; //to store the name

     

      public Hello (String names) //parameterized constructor

      { name = names;  }  

     

      public void English() { //method to greet user in english

           System.out.print("Hello "); //displays Hello on output screen

           System.out.print(name); //displays user name

           System.out.println("!");  }  //displays exclamation mark symbol

           

           public void Spanish(){ //method to greet user in spanish

               System.out.print("Hola "); //displays Hello on output screen

               System.out.print(name); //displays user name

               System.out.println("!"); } //displays exclamation mark symbol

           

         public void French() { //method to greet user in french

              System.out.print("Bonjour "); //displays Hello on output screen

              System.out.print(name);  //displays user name

              System.out.println("!");  } } //displays exclamation mark symbol

           

Explanation:

Here is the HelloTester class:

import java.util.Scanner; //to accept input from user

public class HelloTester { //class name

 public static void main (String[]args)  { //start of main method

String name; //to store the name of user

Scanner input = new Scanner(System.in);  //creates Scanner class object

System.out.println("Enter name?" );  //prompts user to enter name

 name = input.nextLine(); //scans and reads the name from user

 Hello hello = new Hello(name); //creates Hello class object and calls constructor by passing name

hello.English(); //calls English method using object hello to greet in english

hello.Spanish(); //calls Spanish method using object hello to greet in spanish

hello.French(); } }  //calls French method using object hello to greet in french

The output of the program is:

Enter name?                                                                                                                    user                                                                                                                           Hello user!                                                                                                                    Hola user!                                                                                                                    Bonjour user!  

The screenshot of the program along with its output is attached.

4 0
3 years ago
Assign total_owls with the sum of num_owls_A and num_owls_B.
jonny [76]

Answer:

Explanation:

  • We declare the variable about the zoo with the owl's quantity, we could put any integer.
  • We make the sum operation zooA + zooB, with the variable total_owls.
  • we print the result about the two zoo.

num_owls_zooA= 3

num_owls_zooB = 4

total_owls = 0

total_owls = num_owls_zooA + num_owls_zooB

print('Number of owls:', total_owls)

3 0
3 years ago
The transmission control protocol (TCP) layer helps computers to communicate in which of the following ways?
Natali5045456 [20]
Ensuring that messages will be received just as they were sent
4 0
3 years ago
Other questions:
  • Please answer these questions! Will mark Brainliest!!
    7·1 answer
  • Which device makes computers that are connected to separate segments appear and behave as if they're on the same segment? (Pleas
    11·1 answer
  • Jerry wants to save his company money. He decides to move to open source software for his word processing needs. Jerry then down
    5·1 answer
  • Which installation changes from the old information system to the new one incrementally, starting with one or a few functional c
    14·1 answer
  • Discuss briefly general-purpose graphicsprimitives that contain 2D graphics library.
    15·1 answer
  • My mom hid my laptop and now I can't find it​
    9·1 answer
  • The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sumof the previous two, for example: 0, 1
    11·1 answer
  • Swapping two input integers if they are not the same. (use switch-case
    10·1 answer
  • Think of all your favorite movies or games. Is their digital animation present? How do you think that it affected the movie or g
    13·2 answers
  • 1. Which is not a cold sandwich?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!