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
What would be some reasons to change the default page<br> encoding?
madam [21]

Answer:

Synchronization with the document for one reason or another

5 0
3 years ago
What is a mortgage?
wel
D is the answer. Have a good day!
8 0
3 years ago
Read 2 more answers
Consider the declaration of the struct houseType given in this chapter. Suppose firstHouse and secondHouse are variables of hous
Ilia_Sergeevich [38]

Answer:

See Explanation

Explanation:

The question is incomplete as there is no link pointing to the houseType struct of chapter 1.

So, I've answered the question from scratch

See attachment for explanation where I used comments to explain each line.

The program is as follows:

#include <iostream>

using namespace std;  

struct houseType{

   int firstHouse, secondHouse;

};

int main() {

   houseType hT;      

   cout << "Enter the price of both house: ";

   cin>> hT.firstHouse;

   cin>> hT.secondHouse;

   if(hT.firstHouse == hT.secondHouse){ cout<<"true";    }

   else{ cout<<"false";    }  

   return 0;

}

Download cpp
6 0
3 years ago
An organization needs to maintain data files of its employees in the form of tables. They also need to access and update over th
olga nikolaevna [1]

Answer:

A

Explanation:

Database software is a software program or utility used for creating, editing and maintaining database files and records. This type of software allows users to store data in the form of structured fields, tables and columns, which can then be retrieved directly and/or through programmatic access.

7 0
2 years ago
Operating systems employ a technique called ________ to prevent indefinite postponementâ as a thread waits in the ready state, t
BigorU [14]

Answer:

Aging

Explanation:

4 0
3 years ago
Other questions:
  • When sociologists say that it is difficult to predict all the results of social change, what are they referring to?
    5·1 answer
  • Many who enter the field of information security are technical professionals such as __________ who find themselves working on i
    13·1 answer
  • What were precomputed tables and why were they necessary?​
    12·2 answers
  • A _____ is a predefined text format that includes multiple formatting options.
    14·1 answer
  • Write a program that will open the file random.txt and calculate and display the following: A. The number of numbers in the file
    12·1 answer
  • At the beginning of this month, the balance of Reed's checking account was $692.35. So far this month, he has received a paychec
    13·2 answers
  • Mention<br>any<br>5<br>indicators of<br>happiness​
    11·2 answers
  • Which character goes at the end of a line of code that starts with if?
    8·1 answer
  • The auxiliary device used to store large volume of data and program for future is called​
    10·1 answer
  • Digital communication and production chapter 17
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!