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
Ivahew [28]
3 years ago
7

8.6 Code Practice: Question 2

Computers and Technology
1 answer:
Rina8888 [55]3 years ago
4 0

Answer:

import random

def buildArray(a, n):

   for i in range (n):

      a.append(random.randint(10,99))

     

arr = []

def sumArray(a):

   tot = 0

   for i in range(len(a)):

       tot = tot + a [i]

   return tot

       

   

arr = []

numbers = int(input("How many values to add to the array:\n"))

buildArray(arr, numbers)

print(arr)

print("Total " + str(sumArray(arr)) )

Explanation:

You might be interested in
Describe 6 difference of the types of computer<br>​
Trava [24]

Answer:

<h3>1. Supercomputer</h3>

One of types of computers is supercomputer. It is a computer that is at the front-line of current processing capacity, particularly speed of calculation. It is usually used to do tasks involving intense numerical calculations such as weather forecasting, fluid dynamics, nuclear simulations, theoretical astrophysics, and complex scientific computations

<h3>2. Mainframe Computer</h3>

Another computer type is mainframe computer. It is a computer that is capable of handling and processing very large amounts of data quickly. Its calculation speed can reach millions to tens of millions instructions per second (MIPS) and it can respond to hundreds of millions of users at a time.

This computer type is mainly used in large institutions such as government, banks and large corporations.

<h3>3. Minicomputer (Mid-Range Computer)</h3>

Minicomputers are a class of multi-user computers that lie in the middle range of the computing spectrum, in between the smallest mainframe computers and the largest single-user systems (microcomputers or personal computers).

Minicomputers are usually small in scale, simple in structure, easy to maintain, and low in cost. Therefore, they are often used in universities, scientific research institutions and industrial control fields.

<h3>4. Microcomputer (Personal Computer)</h3>

The term “microcomputer” was introduced with the advent of systems based on single chip microprocessors. In the early days, the microcomputers would still have been too expensive to be owned by a single individual. But in the late 20th century, microcomputers became the most common type of computer.

Therefore, the term "microcomputer" has practically become an anachronism and has been replaced the term "personal computer (PC)".

Personal computer has developed rapidly because of its small size, convenient use, low production cost, and low price. PC computing speed can reach hundreds of thousands to millions instructions per second, which can meet the requirements of data processing and scientific computing in production, scientific research, and life.

<h3>5. Workstation Computer</h3>

A workstation computer is a high-end personal computer between microcomputers and minicomputers. It is usually equipped with large-capacity memory, external storage, and large-screen displays. Therefore, it has strong data processing capabilities and graphics processing capabilities.

Workstation computers are designed and developed mainly for professional application fields like engineering design, animation production, scientific research, software development, financial management, information services, analog simulation, etc.

<h3>6. Server Computer</h3>

A server refers to a high-performance computer that provides shared information resources and various services for many users on the network at the same time in a network environment.

A server is expected to be capable of high-speed computing, long-term reliable operation (it features error-correction of RAM; redundant cooling; self-monitoring, RAID), and powerful external data throughput.

The structure of the server is similar to that of an ordinary computer. Many smaller servers are actually personal computers that have been dedicated to provide services for other computers. But they are very different in terms of processing power, stability, reliability, security, scalability, and manageability.

According to the services provided, server computers can be subdivided into database server, file server, Web server, FTP server, etc.

<h2>hope helpful <3</h2>
4 0
3 years ago
Summarize who you believe cyber criminals are, and why?
sergij07 [2.7K]

Answer:

 The cyber criminals are the people that are engaged with getting the data in an unapproved way and furthermore mischief to the association henceforth are considered as cyber criminals.

Cyber criminals are people or groups of individuals who use innovation to committed the malicious exercises on computerized frameworks or systems with the aim of taking the organization data or individual information and producing benefit.

There are many types of cyber criminals that are:

  • Internet stalkers
  • Cyber terrorist
  • Identity thieves

5 0
4 years ago
What is the difference between (IF instructions &amp; WHILE instructions )<br> 0<br> 를 들<br> T<br> !
lara31 [8.8K]

Answer:

While statements determine whether a statement is true or false. If what’s stated is true, then the program runs the statement and returns to the first step. If what’s stated is false, the program exits the while and goes to the next statement. An added step to while statements is turning them into continuous loops. If you don’t change the value so that the condition is never false, the while statement becomes an infinite loop.

If statements are the simplest form of conditional statements, statements that allow us to check conditions and change behavior/output accordingly. The part of the statement following the if is called the condition. If the condition is true, the instruction in the statement runs. If the condition is not true, it does not. The if statements are also compound statements. They have a header (if x) followed by an indented statement (an instruction to be followed is x is true). There is no limit to the number of these indented statements, but there must be at least one.

7 0
3 years ago
Suppose that you are given the following partial data segment, which starts at address 0x0700 : .data idArray DWORD 1800, 1719,
Digiron [165]

Answer:

The value EAX contain after the code has been executed is 1233

Explanation:

Solution

Now,

The below instruction describes the MOV operation.

The MOV esi, OFFSET idArray .

It shows the movement, the offset value of the idArray in the esi.

Thus,

Follow the below instruction

MOV eax, [esi+7*TYPE idArray]

It will move the address of the idArray at that position into eax.

Value at the 7th position is moved to eax.

Therefore, the value at eax will be 1233.

5 0
4 years ago
One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a number of miles as input
salantis [7]

Answer:

import java.util.Scanner;

public class Miles {

public static void main(String[] args) {

   //initialization

       double Number_Miles;

       //print the message

       System.out.print("Enter the number of miles: ");

       Scanner scn1 = new Scanner(System.in);

       

       Number_Miles = scn1.nextDouble();  //read the input from user

       //calculate the laps

       double yourValue = Number_Miles/0.25;

       //display the output on the screen

       System.out.printf("%.2f", yourValue);

     

}

}  

Explanation:

First import the library Scanner than create the class and define the main function. In the main function, declare the variables.

print the message on the screen and then store the value enter by the user into the variable.

Scanner is a class that is used for reading the output. So, we make the object of the class Scanner and then object call the function nextDouble() which reads the input and store in the variable.

After that, calculate the number of laps by dividing the number of miles with the given one lap running track value (0.25 miles).

Number\,of\,laps = \frac{Number\,of\,miles}{0.25}

the output is stored in the variable.

After that, print the value on the screen with 2 digits after the decimal point.

we can use "%.2f" in the printing function in java.

like System.out.printf("%.2f", output);

5 0
3 years ago
Read 2 more answers
Other questions:
  • How do you enlarge your screen if there is no control panel? Need desperate help!
    15·1 answer
  • Recursive Power Function Write a function that uses recursion to raise a number to a power. The function should accept two argum
    15·1 answer
  • This is not based on homework but I have a question. I am currently using a gtx 960 with a 6 core amd processor. Does anyone kno
    6·1 answer
  • The amount of money you can charge to a credit card is called?
    5·2 answers
  • Describe the steps to play a presentation the way your audience will see it.
    8·2 answers
  • What is the definition of the word uproot?
    15·1 answer
  • What type of malicious software tries to gather information about you without your consent?
    7·1 answer
  • OSI layer for HDLC??​
    13·1 answer
  • What are different sheet icons
    5·1 answer
  • where should a user disable virus protection settings that might prevent the boot area of the hard drive from being altered? a.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!