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
nlexa [21]
3 years ago
6

Write a method named buildArray that builds an array by appending a given number of random two-digit integers. It should accept

two parameters—the first parameter is the array, and the second is an integer for how many random values to add.
Print the array after calling buildArray.
Computers and Technology
1 answer:
saul85 [17]3 years ago
7 0

Answer:

the code using Python

Explanation:

import random

def buildArray(array, size):

for i in range(size):

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

def sumArray(array , num):

sum_array = 0

for i in range(num):

sum_array += array[i]

return sum_array

 

def main():

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

array = []

buildArray(array, n)

print(array)

 

num = int(input("How many values to find sum of array:\n"))

result= sumArray(array,num)

print(result)

 

main()

You might be interested in
When connecting past and present issues, it is best to follow a series of steps. Which step is missing from the pattern? 1. Iden
Evgen [1.6K]

Establish Cause & Effect

4 0
3 years ago
Brent recently received funding for his fast-food chain in Michigan. As a result, he hires Angela to set up a top-level domain s
Elena-2011 [213]

The option among the top level domain names that Angela should opt for under such requirements is .biz.

<h3>What's a domain name? </h3>

Domain names are known to be formed to create IP addresses very easy so that one can easily remember.

Note that the domain name of biz is better for Angela to use as it is suitable for her business and as such, The option among the top level domain names that Angela should opt for under such requirements is .biz.

Learn more about domain name from

brainly.com/question/17062016

#SPJ1

5 0
2 years ago
Opposite word of reassembling​
Marysya12 [62]
<h3>OPPOSITE WORDS OF REASSEMBLING</h3>

  • disperse
  • disband
  • separate
8 0
3 years ago
Read 2 more answers
A friend a just opened his own barber shop and has asked you to develop a program to track the type of service the customer is r
True [87]

Answer:

class Barber(object):

   barber_shop = "Big AI's barber shop"

   def __init__(self, customer_name, type_of_service=[], tip=0):

       self.cust_name = customer_name

       self.tos = type_of_service

       self.tip = tip

   def service_type(self, *args):

       for i in args:

           self.tos.append(i)

   def total(self):

       

       services = {'trimming':10, 'hair_cut':20, 'shaving':15, 'washing':5, 'dyeing':5}

       contain = ''

       total = 0

       for service in self.tos:

           if service in services.keys():

               total += services[service]

               contain += f'{service}: {services[service]}\n'

       

       print(self.barber_shop,'\n', self.cust_name,'\n', 'Services:',contain.splitlines(),'\n', \

           f'total: ${total}', '\n',f'Tip: ${self.tip}')

mycust = Barber('John',['washing'],6 )

mycust.service_type('shaving', 'dyeing')

mycust.total()

Explanation:

The Barber class is a blueprint used to create an object instance of customers that visits the barber-shop. It has two methods 'service_type' and 'total' which are just defined functions of the class that appends services to the type of service variable and total that prints the total cost of services on the screen.

4 0
3 years ago
Rainbow six siege imi da ecran negru.Ce sa fac?
Oduvanchick [21]
Mmmmmmmm check the internet
7 0
3 years ago
Other questions:
  • In a case where electrical current leakage from the circuit occurs,
    7·2 answers
  • In nutanix command-line interface (ncli) commands, each entity has a unique set of actions, but a common action across all entit
    15·1 answer
  • In C++ :
    6·1 answer
  • Technician A says that oil for the rod bearings comes from splash off the crankshaft. Technician B says that lubrication to the
    14·1 answer
  • Why are renewable natural resources important? A.fossil fuels can be replaced quickly.
    10·1 answer
  • As you continue to build the help desk, you want to ensure that all of the tools are in place and that the analysts have the too
    15·1 answer
  • Explica porque se afirma que la existencia de estaciones cambia las combstumbres y la cultura​
    14·1 answer
  • Adrian wants to run a digital movie clip that his friend shared with him through email. His system has 2 GB of RAM and 20 GB of
    9·1 answer
  • Which of the following can you use to judge source legitimacy?
    6·2 answers
  • Chloe is not pleased with how four images that she has placed on a web page relate to each other. Which search string will be mo
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!