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]
2 years ago
7

8.6 Code Practice: Question 2

Computers and Technology
1 answer:
Rina8888 [55]2 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
A group known as ""Takedown"" hacked into your political action committee website and defaced it. Which type of threat actor is
natima [27]
<h2>Answer:</h2><h3>Hacktivist group is most likely to responsible for this.</h3><h3 /><h2>Explanation:</h2>

Hacktivism is defined as an action in which a computer or a network is targeted so that it could be misused in order to achieve a goal against any social or political action.

Hacktivists are the persons who perform hacktivism in order to seek attention on a specific thing or issue they want, from all the people.

In the given scenario, the hacking attack is hactivism as it is done to pull the company down.

Hacktivist can be a single person as well as a group of people working together. However they try to work anonymously so that they could not be traced.

<h3>I hope it will help you! </h3>
6 0
3 years ago
2) The CPU is made from a silicon<br>a) Steel<br>b) Chip<br>c) pendrive​
almond37 [142]

Answer:

Address buses are made up of a collection of wires connecting the CPU with main memory that is used to identify particular locations (addresses) in main memory. The width of the address bus (that is, the number of wires) determines how many unique memory locations can be addressed.

Explanation:

6 0
3 years ago
Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code ha
Mama L [17]

In the program While loop is used. In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum. The inputs and corresponding outputs are written in the explanation.

<u>Explanation</u>:

In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum.

import java.util.Scanner;  

public class NonNegativeLooper

public static void main (String [] args)

Scanner scnr = new Scanner(System.in);  

//initialize the userNum with 9

int userNum = 9;

//Repeat the loop until the userNum is not negative

while (userNum>=0)

System.out.println(Body);

//Prompt the user to enter the usrNum again

userNum = scnr.nextInt();

System.out.println(Done.);

return;

8 0
3 years ago
What is control flow in programming?
melisa1 [442]

Answer: Control flow, also known as flow of control in computer programming, refers to the sequence in which function calls, instructions, and statements are performed or assessed while a program is operating. Control flow statements are used in many programming languages to determine which part of code runs in a program at any given time.

4 0
2 years ago
Relerant<br>society, using<br>the<br>impact of computer in<br>2. Discuss<br>examples​
MA_775_DIABLO [31]
Computers have changed the way people relate to one another and their living environment, as well as how humans organize their work, their communities, and their time. Society, in turn, has influenced the development of computers through the needs people have for processing information.
8 0
3 years ago
Other questions:
  • Computer-generated color images of the brain that provide information about brain activity and glucose metabolism are produced b
    8·1 answer
  • Derek has an interest in designing video games. What requirements should he fulfill to be a game designer?
    13·1 answer
  • Which type of cell references are locked and NOT automatically updated when it’s copied
    8·1 answer
  • 9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
    9·1 answer
  • Studying MyMagic+ helps one understand the costs associated with information systems deployment at scale. According to your read
    12·1 answer
  • What is the symbol for the relational operator 'equal to'?
    8·1 answer
  • Host A is sending Host B a large le over a TCP connection. Assume Host B has no data to send Host A. Host B will not send acknow
    14·1 answer
  • As the security administrator for your organization, you must be aware of all types of attacks that can occur and plan for them.
    10·1 answer
  • Vkq-jnfi-uif se-x fun girls joi-n mee-t usin-g this cod_e​
    6·1 answer
  • Rohan is creating a presentation with at least 50 slides. He wants the slides to use a consistent layout and formatting. Which o
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!