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
What does considering scale mean in science?
Annette [7]

Answer: scale (chemistry), the range of mass or volume of a chemical reaction or process.

Explanation:

:D h

5 0
2 years ago
Analyze the following code.
vazorg [7]

Answer:

The correct answer for the given question is "The program has a runtime NullPointerException because test is null while executing test.x"

Explanation:

In this code their is run time exception will occur in Main method i.e "java.lang.NullPointerException "because the object of the Test class i.e test will initialized by "null" .So on executing the statement test.x  it gives an Runtime Exception.The "NullPointerException" can occur if we assign the object to the "null" value that why it produce an java.lang.NullPointerException

8 0
3 years ago
What is the difference between the paste and paste special options
Darina [25.2K]

Paste special allows the item being transferred to be formatted in several different ways. Paste is just going to be transferred the exact way you copied it.

7 0
3 years ago
What is a programming method that provides for interactive modules to a website?
Veseljchak [2.6K]

Answer:

Java?

Explanation:

8 0
3 years ago
How to adjust screen from 1024x728 to 800x600
densk [106]
Goto settings>display>resolution what os is your system? this was for a win 10
5 0
3 years ago
Other questions:
  • A user can easily moved to the end of document by pressing what key combination?
    8·2 answers
  • Typically, a programmer develops a programâs logic, writes the code, and ____ the program, receiving a list of syntax errors.
    6·1 answer
  • Which wireless communication technology is most likely used when synchronizing device information to an automobile?
    9·1 answer
  • Clicking on the sheet tab with the _______ adds another worksheet to an Excel file.
    9·1 answer
  • Robert works in a call center and receives a call from Kathy. Kathy says she can no longer access the online reporting applicati
    13·1 answer
  • Given the function F (X, Y , Z)=Σm(0,1, 2 , 4 , 6)
    13·1 answer
  • Out-of-order instruction execution can cause problems because a later instruction may depend on the results from an earlier inst
    6·1 answer
  • What are the difference among the whole note, half note and quarter note ? (this is music)
    12·2 answers
  • 2
    6·1 answer
  • What job does a front-end developer perform?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!