Write a MATLAB function named average_of_scores_with_drops The function will have two inputs and two return values. The first input will be a list of scores. The second input will be a postive integer representing the number of scores to drop. It will not be larger than the length of the list. Your function should determine the average of the scores after dropping the specified number of lowest scores. The first return value must be a real number equal to the average score. The second return value must be the number of items that were averaged. Notes: Example Test Case: SCORES

Answers

Answer 1

Answer:

-%Define the function.

function [avg, ele_left] = average_of_scores_with_drops(input_list, drop_element)

%Sort the list.

input_list = sort(input_list);

%Compute the length of the list.

len_list = length(input_list);

%Declare and initialize the variable.

sum = 0;

%Increase the element to be drop by 1.

i = drop_element + 1;

%begin the for loop.

for k = i : length(input_list)

%Add the elements.

sum = sum + input_list(k);

%End of the for loop.  

end

%Compute the elements left after dropping the dropped element.

ele_left = length(input_list) - drop_element;

%Compute the average of the elements left.

avg = sum/ele_left;

%End of the function defined.

end

%Run the following code in the command prompt.

%Call the function and return the average

%score and the number of elements

%whose average is computed.

[average_score , number_of_items] = average_of_scores_with_drops([8 6 1 2 3 5 10], 2)

SAMPLE OF OUTPUT

average_score = 6.40000000000000

number_of_items = 5


Related Questions

Which of the following is not true about templates?

It incorporates formatting elements.

They slow down the process of creating presentations.

It incoprorates layout options.

It may include content that can be modified.

Answers

The answer is they slow down the creating of presentations.

What is true about connectionless packet switched networks? a. each datagram must contain both source and destination addresses b. without a connection, datagrams may not arrive in sequential order at the destination c. establishment of a connection between communicating points is not required prior to exchanging datagrams, thus reducing overhead communications d. all of the above are true

Answers

Answer:

d. all of the above are true

Explanation:

Connectionless Packet Switching is a term that is used in computer networking operations to describe the breaking of information exchange path into a various packet of small sizes acquired and refined over network switches and routers, which is then transferred from one subsequent node to the other. It is sometimes referred to as Datagram Networks

However, during this operation, Connectionless Packet Switching must satisfy the following amongst others:

1.  each datagram must comprise both source and destination addresses

2.   without a connection, datagrams may not come in sequential order at the destination

3.  establishment of a connection between communicating points is not needed prior to exchanging datagrams, thus reducing overhead communications

Therefore, considering the available options, the correct answer is option D

Suppose you have a class Ship, which was written by another programmer who used to work for your employer. Ship is used in several different applications. Ship contains a public method called getBearing() that consults gyroscopes and a compass to determine the direction in which the ship is moving and returns a Location object. You need to refactor the code to use a GPS receiver instead. You should

Answers

Answer:

Research of the GPS features and the modules and packages needed by the programming language to implement and receive data from a GPS tracker.

Explanation:

The Ship class is a blueprint that holds a data structure of a ship's location in coordinates. The location variable can be changed using the getBearing method and an instance of the ship class can be made several times for different ships in the harbor. This class depicts the power of object-oriented programming.

Refactoring is a concept in software engineering where source codes are modified to achieve code efficiency and speed. All programming language source code should be refactored where needed with the right packages or modules.

what is ovoviviparous? ​

Answers

Answer:

o·vo·vi·vip·a·rous

Explanation:

(of an animal) producing young by means of eggs which are hatched within the body of the parent, as in some snakes.

For what purpose are high-level programming languages used for

1. Give control over the hardware to execute tasks quickly

2. Provide code that controls the computers hardware

3. Translate low-level programming languages into machine code

4. Write programs for general applications

Answers

Answer:

To speed up the compiler during run time

Explanation:

Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loops that produce the following output: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 . . . n . . . 5 4 3 2 1 Your prompt to the user should be: Please enter a number 1...9 : Please note that your class should be named PatternTwo.

Answers

Answer:

Here is the JAVA program:

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

public class PatternTwo{   //class name

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

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

System.out.print("Please enter a number: ");  //prompts user to enter an int n for the number of rows

int n = scan.nextInt();   //reads and scans the value of n from user

int i, j;   //declares two variables to iterate through i  rows and j columns

for (i=1; i<=n; i++){    //outer loop for rows  

for (j=2*(n-i); j>=1; j--){   //inner loop for space between numbers in pattern  

System.out.print(" ");  }   //displays an empty space in the pattern

for (j = i; j >= 1; j--)  { //inner loop for columns  

System.out.print(j+" "); }   //prints the value of j (prints numbers in reverse)

System.out.println();   }   }   }  //prints a new line after printing each row

Explanation:

The program is explained with an example in the attached document.

Your network administrator finds a virus in the network software. Fortunately, she was able to eliminate it before it resulted in a denial-of-service attack, which would have prevented legitimate users of the networked database from gaining access to the records needed. It turns out that the network software did not have adequate security protections in place. The fact that this virus was successfully inserted into the network software points to a ______ the network software.

Answers

Answer:

Vulnerability of.

Explanation:

In this scenario, your network administrator finds a virus in the network software. Fortunately, she was able to eliminate it before it resulted in a denial-of-service attack, which would have prevented legitimate users of the networked database from gaining access to the records needed. It turns out that the network software did not have adequate security protections in place. The fact that this virus was successfully inserted into the network software points to a vulnerability of the network software.

In Cybersecurity, vulnerability can be defined as any weakness, flaw or defect found in a software application or network and are exploitable by an attacker or hacker to gain an unauthorized access or privileges to sensitive data in a computer system.

This ultimately implies that, vulnerability in a network avail attackers or any threat agent the opportunity to leverage on the flaws, errors, weaknesses or defects found in order to compromise the security of the network.

Some of the ways to prevent vulnerability in a network are;

1. Ensure you use a very strong password with complexity through the use of alphanumerics.

2. You should use a two-way authentication service.

3. You should use encrypting software applications or services.

The question is in the picture

Answers

Answer:

nordthaf

Explanation:

nofth

Which of these browsers was the first widely adopted?
1. Internet Explorer
2. Chrome
3. Firefox
4. Netscape

Answers

Answer:

netscape

Explanation:

which check the functioning of all the connected hardwares including primary and secondary storage devices​

Answers

Answer: The computer processor

Explanation:

The computer processor is also called the central processing unit and it's function is to analyzes data and also disperses data. It is the computer's brain as it tells the computer the kind of programs to do at a particular time.

The computer processor checks the functioning of all the connected hardwares including primary and secondary storage devices.

Where is the video card located in a computer?

Answers

Video card??????????
pretty sure it’s in the motherboard?

What is the name of a shortcut you can click to access other websites? A. A post B. A key C. HTML D. A link

Answers

Answer:

D. A link

Explanation:

I hope this helps.

Answer:

A LINK

Explanation:

I just did the test

When computers are connected and operate through one main computer, it is called a _________ network. centralized client server GUI peer-peer

Answers

Answer:

the answer would be a client server

Explanation:

In a situation wherein computers are connected and operate through one main computer, it is called a client server network. Therefore, the option B holds true.

What is the significance of a client server network?

A client-server network can be referred to or considered as a network wherein all the systems that are collectively a part of the computer network are controlled and handled by a single system. This single system of computers is also known as the main computer.

The main computer has access to all the data, as well as information tracking of the activities performed by the main computer. In order to access anything between the different systems, the members systems need to get authorized access through the main computer.

Therefore, the option B holds true and states regarding the significance of a client server network.

Learn more about a client server network here:

https://brainly.com/question/28099574

#SPJ2

briefly explain the usage of the MS PowerPoint

Answers

Answer:

PowerPoint is a computer program that allows you to create and show slides to support a presentation. You can combine text, graphics and multi-media content to create professional presentations.

Answer:

Making your presentation more interesting through the use of multimedia can help to improve the audience's focus. PowerPoint allows you to use images, audio and video to have a greater visual impact. These visual and audio cues may also help a presenter be more improvisational and interactive with the audience.

A network is:
A. A group of people or things that are individually connected to one another.
B. A number of individuals who share the same values and ideas.
C.a means of mass communication in print and other forms.
D. The main idea or information contained in a media piece.

Answers

Explanation:

The answer to this question is A

How to Print output in JavaScript

Answers

If you want to print on a page you can use

document.write();

If you want to write in console then there are multiple options

console.log() - to log information

console.error();- to log errors

console.warn(); - to log warning message

If you want to popup some information the you can use -

alert(message);

there are also various options present in alert.

or

print() essentially just calls up the native print dialog for a given window.

But as you're are thinking, it will work on any window or (i)frame.

thus if you write content to a frame, you can then call this to print it.

window.frameName.print();

note the only drawback (and its a big one), is that this calls up the print dialog... not the print preview window... thus the user doesn't really get a chance to see what they are printing and/or scale it to fit their printer/paper.

I personally wish that all browsers would implement the following to handle the above issue.

window.printPreview();

Hope this will help !!!

Answer:

Just add "document.wright();" to print text.

The binary string 00100100 is a member of which of the following problems? Remember, a "problem" is a language whose strings represent the cases of a problem that have the answer "yes." In this question, you should assume that all languages are sets of binary strings interpreted as base-2 integers. The exception is the problem of finding palindromes, which are strings that are identical when reversed, like 00100100, regardless of their numerical value.

Answers

This question is incomplete, the complete question is;

The binary string 00100100 is a member of which of the following problems? Remember, a "problem" is a language whose strings represent the cases of a problem that have the answer "yes." In this question, you should assume that all languages are sets of binary strings interpreted as base-2 integers. The exception is the problem of finding palindromes, which are strings that are identical when reversed, like 00100100, regardless of their numerical value.

a) Is the given string a palindromes ?

b) Is the given string a perfect cube?

c) Is the given string greater than 50?

d) Is the given string even?

e) is the given string a perfect square?

Answer:

a) the given binary string is a palindromes

b) the given string is NOT a perfect cube

c) the given string is NOT greater than 50?

d) the given string is an even

e) the given string a perfect square

Explanation:

Given that;

binary string : 00100100

a)

Is the given string a palindromes ?

the given binary string = 00100100

now when you reverse the string, its still going to be : 00100100

so the given binary string is a palindromes

b)

Is the given string a perfect cube

the given string : 00100100 = 36

now 2^3 = 8,

3^3 = 27,

4^3 = 64

so 36 is not a perfect cubic

hence the given string is NOT a perfect cube

c)

Is the given string greater than 50?

the given string : 00100100 = 36

and 36 < 50

so the given string is NOT greater than 50?

d)

Is the given string even?

the given string  : 00100100 = 36

and 36 can be divided exactly by 2

so the given string is an even

e)

is the given string a perfect square?

the given string  : 00100100 = 36

now 6^2 = 36  i.e 6 multiply by 6 = 36

therefore the given string a perfect square

Help me for this question

Answers

Answer:

Answer C

Explanation:

You are welcome

why is makyra a loser??​

Answers

Because she doesn’t have any friends :-(

Answer:

She dumbbbbbbbbbbbbbbbbbbbbbb

Explanation: Her mom watched too much spongebob while pregnant

edhesive 1.7 code practice question 1
Fix the error so that the code works correctly
input (“Enter a number: “)
print (num * 8)
How do I fix the error?

Answers

Answer:

num = int(input("Enter a number: "))

print(num * 8)

Explanation:

I highlighted the parts that are added

Since you are getting an input from the user, you need to set the result to a variable. In this case, it is num.

Since it is a number, you need to specify the its type. In this case, it may be int.

Also, the quotation marks must be written as seen.

The corrected program which ensures that the program runs correctly is written thus :

num = int(input("Enter a number: ")

#user supplied input should be assigned to the varibale num

print(num * 8)

#multiplies num by 8 and displays the output.

The num variable in the second line isn't attached to any value, therefore, it will throw an error.

The user input value should be attached to the variable, 'num'

The second line of code multiplies num by 8 and displays the product.

Therefore, if the the user input is 3 ; the final result displayed will be : (3 × 8) = 24.

Learn more :https://brainly.com/question/15566254

Naseer has inserted an image into his document but needs the image to appear on its own line.

Which option should he choose?

•Top and Bottom
•Tight
•Through
•In front of text

Answers

Answer:

Top and Bottom

Explanation:

took the test

Answer: A

Explanation:

The person who Oversee the direct work of employees and is responsible for the day-to-day tasks the employees complete is likely

Answers

Answer: Operational Manager

Answer: operational manager

Explanation: APEX

Explain demand paging with a proper example

Answers

Demand paging :

In computer operating systems, demand paging (as opposed to anticipatory paging) is a method of virtual memory management. In a system that uses demand paging, the operating system copies a disk page into physical memory only if an attempt is made to access it and that page is not already in memory (i.e., if a page fault occurs). It follows that a process begins execution with none of its pages in physical memory, and many page faults will occur until most of a process's working set of pages are located in physical memory. This is an example of a lazy loading technique.

what are the earliest invention in human history​

Answers

Answer: Tools, Boats, Hand made bricks.

Explanation: The tools were the first technological advancement, the boats were the next, them hand made bricks for construction.

1605:newspapers
1608:telescope
1620:Compound microscope
1630:Slide rule
1642:mechanical calculator 1643:barometer
1650:vacuum pump
1656:pendulum clock

Hope this is enough

Many of the first photographers were actullay scientists and inventors

Answers

Answer:

True, if its a true or false. Otherwise I am of no help.

Explanation:

Answer:

True

Explanation:

What problems might you encounter when using the Web for research?
a. Lack of current news
b. Undocumented sources
c. Lack of search tools
d. Time-consuming searches
e. Unreliable conten

Answers

Answer:

b. d. e.

Explanation:

The web is a vast and endless database of information and has become an invaluable resource for research. That being said it can also bring with it many problems, the main one being unreliable content due to undocumented sources, false testimonies, information with no evidence, etc. The amount of false information on the internet can sometimes make it very time consuming since you have to take the extra step of verifying the information you come across. Despite this, the WEB has information on every topic including current news, and with the wide array of search tools available it is very easy to find what you are looking for.

Write code that determines the number of full days represented by the number of hours stored in the variable hours and stores that value in the variable full_days. For example, the number of full days in 50 hours is 2. Ignore any leftover hours that don't contribute to a full day. Assume the value of hours has already been initialized. Solve It!

Answers

Answer:

hours = 50

full_days = int(hours / 24)

print("The number of full days in " + str(hours) + " hours is " + str(full_days))

Explanation:

Initialize the hours

Since there are 24 hours in a full day, divide the hours by 24. Note that you need to typecast it to the int, because the result is a decimal value by default

Print the values as requested

true false) keybord has two shift keys.​

Answers

Answer:

True, looking at 'em right now!

Explanation:

What is the outside of an iPhone called?

Answers

What, what are you talking about

Sam card tray is the answer

What are three things to consider in programming design?
the problem being addressed, the goals of the project, and the programming language that will be used
the problem being addressed, the goals of the project, and the age of the end users
the age of the end users, the programming language that will be used, and the programming style of the
programmers working on the project
the age of the end users, the goals of the project, and the programming style of the programmers working on the
project

Answers

The issue being solved, the project's objectives, and the users' ages. The project's programmers' programming styles, the programming language they will use, and the age of the intended customers.

What is programming language?

Programming language is defined as a computer language used to converse with computers by programmers (developers). Orthogonality or simplicity, available control structures, data types, and data structures, syntactic design, support for abstraction, expressiveness, type equivalence, strong versus weak type checking, exception handling, and limited aliasing are among the characteristics of a programming language.

Clarity, simplicity, and unity offer a way to express algorithms as well as a framework for thinking about them. Every possible feature combination has value thanks to orthogonality. Surprisingly, it may frequently be reduced to three basic programming constructs known as loops, selects, and sequences.

Thus, the issue being solved, the project's objectives, and the users' ages. The project's programmers' programming styles, the programming language they will use, and the age of the intended customers.

To learn more about programming language, refer to the link below:

https://brainly.com/question/12696037

#SPJ5

Other Questions
whom was Maya Angelou writing to in the poem "Still I rise." Examine the painting above. Based on your knowledge of art and the painting itself, which of the following is not true?a.The large figure is proportionately larger than the other figures to display her significance.b.The painting is a depiction of Saint Sophia and her three daughters.c.The painting was commissioned by the government for the church, as a peace offering.d.All of the figures possess gold halos to indicated they were martyrs for the Church.. what tool should you use to look for information on a network?A. A social networkB. A magnifying glassC. A search engine D. A consumer report does rational numbers, irrational numbers, integers or whole numbers have the fewest numbers !!!5 A Language Arts / Module 22. Choose the answer that correctly punctuates the title of a short story:"gold in the orchard""Gold in the Orchard"Gold in the orchard"Gold in the Orchard On a number line, suppose the coordinate of A is 0, and AR = 9. What are the possible coordinates of the midpoint of AR? Which of the following statements about 13C NMR is not true?A. In 13C proton-decoupled NMR spectra, all peaks are singlets.B. 13C NMR spectra display peaks for only carbons that bear hydrogen atoms.C. 13C NMR chemical shifts occur over a greater range than 1H NMR chemical shifts.D. 13C NMR easily differentiates between the different hybridized carbons (sp3, sp2, and sp hybridized carbons).organic-chemistry Water and nutrients that are not cycled are stored is a There never was a time when the world was without fire, but there was a time when men did not know how to kindle fire; and after they learned how to kindle one, it was a long, long time before they learned how to kindle one easily. In these days we can kindle a fire without any trouble, because we can easily get a match; but we must remember that the match is one of the most wonderful things in the world, and that it took men thousands of years to learn how to make one. Let us learn the history of this familiar little object, the match.Fire was first given to man by nature itself. When a forest is set on fire by cinders from a neighboring volcano, or when a tree is set ablaze by a thunderbolt, we may say that nature strikes a match. In the early history of the world, nature had to kindle all the fires, for man by his own effort was unable to produce a spark. The first method, then, of getting fire for use was to light sticks of wood at a flame kindled by natureby a volcano, perhaps, or by a stroke of lightning. These firebrands were carried to the home and used in kindling the fires there. The fire secured in this way was carefully guarded and was kept burning as long as possible. But the flame, however faithfully watched, would sometimes be extinguished. A sudden gust of wind or a sudden shower would put it out. Then a new firebrand would have to be secured, and this often meant a long journey and a deal of trouble.In 1827, John Walker, a druggist in a small English town, tipped a splint with sulphur, chlorate of potash, and sulphid of antimony, and rubbed it on sandpaper, and it burst into flame. The druggist had discovered the first friction-chemical match, the kind we use to-day. It is called friction-chemical because it is made by mixing certain chemicals together and rubbing them. Although Walker's match did not require the bottle of acid, nevertheless it was not a good one. It could be lighted only by hard rubbing, and it sputtered and threw fire in all directions. In a few years, however, phosphorus was substituted on the tip for antimony, and the change worked wonders. The match could now be lighted with very little rubbing, and it was no longer necessary to have sandpaper upon which to rub it. It would ignite when rubbed on any dry surface, and there was no longer any sputtering. This was the phosphorus match, the match with which we are so familiar. When is the kinetic energy of the ball being transformed into gravitational potential energy? Can someone help me with why a calorimeter has a lid? Ill give brainliest. Thanks She died before her husbandcame. correct the following sentences Qu'est-ce qu'elle va choisir? Elle va choisir deschaussuresO vtementsO chemiseO blousonAnyone can help me with this (3 5/9)(2 2/3) help plz what is -0.5m - 0.75 = 2.15 What were the primary causes of the Crusades? Writers are often given the advice "write what you know." What does thisadvice mean?A. Readers become distracted when they know a story is made up.B. The only way to write well is to write about your own life andexperiences.C. Good writing can come from observations you make about thereal world.D. It is usually best to write about topics you have researchedcarefully he grocery store has bulk pecans on sale, which is great since you're planning on making 5 pecan pies for a wedding. How many pounds of pecans should you buy? First, determine what information you need to answer this question, then click here to display that info (along with other info). You will need to buy pounds of pecans. Why did the Puritans and Separatists leave England for the New World? Check all of the boxes that apply. They wanted to spread the teachings of the Anglican Church. They were persecuted in England. They wanted religious freedom. Bonnie wants to see if playing music to plants will help them grow taller. She buys 4 of the same kind of plant. They all receive the same amount of sun and water. She plays rap music to plant A, country music to plant B, rock music to plant C, and plant D gets no music at all. Everyday for a week she measures the height of each plant.