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
ASHA 777 [7]
2 years ago
13

An array called numbers contains 35 valid integer numbers. Determine and display how many of these values are greater than the a

verage value of all the values of the elements. Hint: Calculate the average before counting the number of values higher than the average
Computers and Technology
1 answer:
natima [27]2 years ago
5 0

python

Answer:

# put the numbers array here

average=sum(numbers)/35 # find average

count=0 #declare count

for i in numbers: #loop through list for each value

if i > average: #if the list number is greater than average

count+=1 #increment the count

print(count) #print count

You might be interested in
How are XY coordinates utilized in construct ?
marshall27 [118]

Answer:

In 2d space we can describe an object's position using 2 values that represent an object's placement on a grid, invisible or not. Typically this is referred to as a 2d coordinate; X and Y. X describes which column the object is in and Y tells what row the object is in. It is pretty much like bingo. A 2d coordinate should look something like these examples: (56,2) or (-1,3). The first number is the X position and tells us how far left or right the position is. The second number is Y and tells us an objects position up and down.

The pixel at the very top left of your screen is always pixel (0,0) - not (1,1). This is because computers always start counting at 0. They think of 0 as being the first position a number can be. This means if your screen is 640 pixels wide, your screen X position will go from 0-639. Any object on screen will have an (x,y) position. and this position can be manipulated by changing these values.

If you subtract from an objects X position it will appear to move left. If you add to it, it will seem as the object is going to the right. Adding to the Y value makes the object go down and subtracting from Y makes it go up.

Just remember: Add to X = right, Subtract from X = left, Add to Y = down, and subtract from Y = Up.

The more you handle (X,Y) coordinates the more second nature this becomes, so don't worry if it seems odd at first.

MOVING AN OBJECT USING VELOCITY

If you simply change an objects position to where you want it to be it will seem as if it is teleporting. Going from (10,10) to (100,100) is a big jump. If you want an object to seem as if it is moving from one place to another then you need to gradually change its position over time. This is an easy process.

In construct 2, a sprite object already has an X and Y position, so all you need to do is create 2 variables, each representing velocity along either the X or Y axis. I normally call them velocityX and velocityY.

Every frame of the game you then add velocity to position. It looks like this below:

notice that I am multiplying velocity by dt. dt stands for Delta Time and tells us how much time has passed since our last frame. Most games will run 60 frames per second, meaning the computer will run the code you made 60 times a second. In this case dt = 0.0166666- or 1/60. Since we want our velocity to be in pixels per second (and not per frame) we multiply velocity by dt. If our velocity was 100 then per frame it would only add 1.6666 to the position of an object. Over the course of a full second the total of the changes will equal 100.

velocity dt frames per second = velocity.

Here is a quick velocity cheat sheet; The velocity of the object is on the left, described using X and Y. The direction the object would be moving as a result is written next to it.

(0,0) - not moving.

(1,0) - moving right.

(-1,0) - moving left.

(0,1) - moving down.

(0,-1) - moving up.

(-1,-1) - moving diagonally up left.

(1,-1) - moving diagonally up right.

(-1,1) - moving diagonally down left.

(1,1) - moving diagonally down right.

Hopefully that wraps it up. Let me know if you have questions.

Introduction to rotation and angles!

6 0
4 years ago
What is another name for an unmanaged switch?
Natalka [10]

Answer:

The answer is "Plug and play".

Explanation:

A switch with minimum debugging tools for log-and-play simplicity and also no IP address. The Unmanaged switches are cost-effective and also have limited power, and other choices are not correct, which can be described as follows:

  • Fast Ethernet provides 10 to 100 Mbps speeds, that's why it is not correct.
  • Gigabit provides bandwidth, which is up to 1 Gbps speed, and it is 10 times faster than Ethernet Fast, that's why it is wrong.
  • The trunk provides the link design that's why it is not correct.
7 0
3 years ago
I'm stuck on this Java exercise problem and don't know how to organize my code with proper formatting and it's not helping that
Volgvan

In your "count spaces method" before the for loop, you want to declare an int variable (let's call it spc)

then, each time you find that charat, spc++.


also, the string must be declared in the main method, not the spaces count method.


The actual code:


public class CountSpaces{

public static void main(String[] args){

String instring = "(your quote here)";

int spaces = calculateSpaces(instring);

System.out.println("The number of spaces is " + spaces);

}

public static int calculateSpaces(String in){

int spc = 0;

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

if(in.charAt(i)== ' '){

spc++;

}

}

return spc;

}

}


that should be it.  If you have any questions, feel free to reach out.

4 0
3 years ago
Using gettimeofday(), determine how long it takes to start a new process with fork(). Include a histogram or other distribution
atroni [7]

Answer:

,jbfuuuyghjk ugvvvtyi uob

Explanation:

flwgrweg

7 0
4 years ago
Using selection sort, how many times longer will sorting a list of 40 elements take compared to a list of 5 elements
Hoochie [10]

It will take 8 times more time to sort a 40-element list compared to the time spent on a 5-element list.

We can arrive at this answer as follows:

  • We can see that if we divide a group of 40 elements into groups containing 5 elements, we will have 8 groups.
  • In this case, the time it would take to sort the list of one group of 5 elements would be repeated 8 times so that we could sort all the groups and their elements.

Another way to do this is to divide the number 40 by 5. We would have the number 8 as a result, which indicates that we would need 8 times more time to sort a list of 40 elements, compared to a list of 5 elements.

You can get more information about lists at this link:

brainly.com/question/4757050

5 0
3 years ago
Other questions:
  • When you schedule an appointment, Outlook adds the appointment to the ____ folder by default.
    9·1 answer
  • Which company is credited with solving a problem by creating a program that could work on all computers?
    11·1 answer
  • If the point (9, 5) is translated 6 units left and 5 units up, then find the
    10·1 answer
  • What is the difference between cout and cerr?
    14·2 answers
  • Write a program that will sort an array of data using the following guidelines - DO NOT USE VECTORS, COLLECTIONS, SETS or any ot
    10·1 answer
  • 2. How is accessing the Internet through a home network and public Wi-Fi similar?​
    15·1 answer
  • Who likes games https://www.gameszap.com/game/12038/y8-multiplayer-stunt-cars.html
    6·1 answer
  • which scheduling algorithm allocate the CPU firt to the process that request the CPU first, (a) first come first serve,(b) short
    9·1 answer
  • Host A sends a packet of length 1,100 bytes to host B over a link with transmission rate 4 Mbps over a distance 1300 km, propaga
    15·1 answer
  • True or false<br>Y axis is also known as the value X.​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!