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
goblinko [34]
4 years ago
13

Write the definition of a function words_typed, that receives two parameters. The first is a person's typing speed in words per

minute (an integer greater than or equal to zero). The second is a time interval in seconds (an integer greater than zero). The function returns the number of words (an integer) that a person with that typing speed would type in that time interval.

Computers and Technology
2 answers:
lianna [129]4 years ago
8 0
<h2>Answer:</h2>

   //Method definition of words_typed

   //The return type is int

   //Takes two int parameters: typingSpeed and timeInterval

   public static int words_typed(int typingSpeed, int timeInterval) {

       //Get the number of words typed by  

       //finding the product of the typing speed and the time interval

       //and then dividing the result by 60 (since the typing speed is in "words

       // per minute"  and the time interval is in "seconds")

       int numberOfWords = typingSpeed * timeInterval / 60;

       

       //return the number of words

       return numberOfWords;

       

   }        //end of method declaration

<h2>Explanation:</h2>

The code above has been written in Java and it contains comments explaining each of the lines of the code. Please go through the comments.

aev [14]4 years ago
6 0

Answer:

I am writing the program in Python.

def words_typed(typing_speed,time_interval):

   typing_speed>=0

   time_interval>0

   no_of_words=int(typing_speed*(time_interval/60))

   return no_of_words

   

output=words_typed(20,30)

print(output)

Explanation:

I will explain the code line by line.

First the statement def words_typed(typing_speed,time_interval) is the definition of a function named words_typed which has two parameters typing_speed and time_interval.

typing_speed variable of integer type in words per minute.

time_interval variable of int type in seconds

The statements typing_speed>=0 and time_interval>0 means that value of typing_speed is greater than or equal to zero and value of time_interval is greater than zero as specified in the question.

The function words_typed is used to return the number of words that a  person with typing speed would type in that time interval. In order to compute the words_typed, the following formula is used:

   no_of_words=int(typing_speed*(time_interval/60))

The value of typing_speed is multiplied by value of time_interval in order to computer number of words and the result of the multiplication is stored in no_of_words. Here the time_interval is divided by 60 because the value of time_interval is in seconds while the value of typing_speed is in minutes. So to convert seconds into minutes the value of time_interval is divided by 60 because 1 minute = 60 seconds.

return no_of_words statement returns the number of words.

output=words_typed(20,30) statement calls the words_typed function and passed two values i.e 20 for typing_speed and 30 for time_interval.

print(output) statement displays the number of words a person with typing speed would type in that time interval, on the output screen.

You might be interested in
A. Create a console-based application named Desks that computes the price of a desk and whose Main() method calls the following
Maslowich

Answer:

Explanation:

Code:-

using System;

using System.Linq;

using System.Collections;

using System.Collections.Generic;

public class Test{

public static int no_drawer(){

Console.WriteLine("Enter the number of drawers : ");

return Int32.Parse(Console.ReadLine());

}

public static char wood_type(){

Console.WriteLine("Enter the type of woods('m' for mahogany, 'o' for oak, or 'p' for pine) : ");

return Console.ReadLine()[0];

}

public static double final_cost(int d,char ch){

double cost = 0.0;

if (ch == 'p') cost += d*100;

else if (ch == 'o') cost += d*140;

else cost += d*180;

cost += d*30;

return cost;

}

public static void display(int d,char ch,double p){

Console.WriteLine("Number of drawers : "+d);

if (ch == 'p')

Console.WriteLine("Type of Wood Chosen : pine");

else if (ch == '0')

Console.WriteLine("Type of Wood Chosen : oak");

else if (ch == 'm')

Console.WriteLine("Type of Wood Chosen : mahogany");

else

Console.WriteLine("Type of Wood Chosen : other");

Console.WriteLine("Total Cost is : "+p);

}

public static void Main(){

int drawers = no_drawer();

char ch_wood = wood_type();

double res = final_cost(drawers,ch_wood);

display(drawers, ch_wood,res);

}

}

cheers i hope this helped !!!

4 0
3 years ago
Name the written test a potential driver must pass and list the minimum required score to earn a learner’s license.
ryzh [129]

Answer:

So as to get a learner’s license, teen drivers are required to finish a composed assessment. Ordinarily they will get ready for this test by finishing a driver’s training course. In spite of the fact that not a necessity in all states, drivers ed is the least demanding approach to be altogether arranged for the confused driving laws and situations you'll look on the license test. When you finish your grant assessment and procure a grant, there may at present be sure confinements joined to this temporary permit, for example, requiring an authorized driver over a specific age to be situated in the traveler situate, constraining your heading to light hours, and other state-commanded rules.  

General United States Permit Requirements  

While each state has its own arrangement of rules, when all is said in done, teenagers between 14 and 18 years of age can begin the drivers training and students license process. When a youngster driver has gotten a learner grant, there are extra state-explicit prerequisites they should meet before they can apply for their drivers permit.  

Before acquiring a learner grant in any express, a young person is required to finish a driving learning assessment. Driver’s instruction is the most ideal route for a youngster to plan for this test, regardless of whether the state requires it or not. At times, passing a driver’s last test of the year can substitute for the composed test. Regardless of how the test is taken, understudies must go with at any rate a 70% or higher, contingent upon that state's base. When the individual passes, a youngster driver will be issued a learner license. A few states require teen drivers to have a grant for at least a half year before they can take their drivers permit test.

Answer details:

Subject: Computer and technology

Level: High school

Keywords:

• Learner’s licence

• Potential drivers

• Written test

• Requirements for written test

Learn more to evaluate:

brainly.com/question/4997492

brainly.com/question/4010464

brainly.com/question/1754173

7 0
4 years ago
Read 2 more answers
What's the answer plssss​
Savatey [412]

Answer:

TELL IT TO YOUR TEACHERS HOW

8 0
3 years ago
allows Internet telephony service providers to deliver telephony services and unified communications applications offering voice
hram777 [196]

Answer:

VoIP

Explanation:

Voice over Internet Protocol. You can share videos, data, voice and other applications.

3 0
3 years ago
Are DHCP messages sent over UDP or TCP? 2. What is the link-layer (e.g., Ethernet) address of your host? 3. What values in the D
maks197457 [2]

Answer:

1.) DHCP is sent over the message at UDP.

2.) The address of link-layer is Source: DellComp_4f:36:23 (00:08:74:4f:36:23)

3.) The message type of value to the discover message is 1, but the message type of value to the request packets is 3. This how you can be differentiate two.

4.) The Transaction ID in first four message is 0x3e5e0ce3

The transaction ID in second sets of messages is 0x257e55a3

The transaction ID is identifies if the message is a part of the set of the messages is related to the one transaction

Explanation:

DHCP is stands for the Dynamic Host Configuration Protocol which is the networks management protocol that is used on the UDP/IP networks where by the DHCP servers dynamically assign the IP address and the other networks configuration parameters to the each devices on the network so they can be communicate with the other IP network.

6 0
4 years ago
Other questions:
  • i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
    13·1 answer
  • Can you put iPhone voice memos on repeat?
    6·2 answers
  • How much does a tech person get each year?
    11·2 answers
  • A technician attempts to run an executable file on a Linux computer but receives a Permission Denied message.
    11·1 answer
  • Please please please help I beg I'll give brainiest. :(
    5·1 answer
  • A printer would be considered _____. Select 2 options. 1 an input device 2 an output device 3 hardware 4 software 5 storage
    10·1 answer
  • b) Derive the logic expressions for the incrementor and 7-sgement decoder. Since software can perform gate-level optimization, y
    7·1 answer
  • What is the definition of the word uproot?
    15·1 answer
  • Write a method named collapse that accepts an array of integers as a parameter and returns a new array where each pair of intege
    6·1 answer
  • What is the current situation of drone technology in emergency rescue and recovery
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!