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
snow_lady [41]
3 years ago
7

Which one of the following statements about functions is TRUE A. A function can change names over the course of a program. B. Co

de can be added or removed dynamically from a function while the program is running. C. Functions can be called using different names depending on where in the program they are called. D. Two functions can be given identical names as long as their code is identical. E. Two functions in a single program can have different names but contain identical code.
Computers and Technology
1 answer:
dangina [55]3 years ago
6 0

Answer:

Answer is E

Explanation:

Two functions with identical codes can have the same name in any programming language. Any of the functions can be called to do its job with the appropriate name. While this is allowed and you wont get errors, just be careful not to waste memory and have redundant code

You might be interested in
A business that subscribes to a specific computing model has its entire system fully functional within a short time. What benefi
defon

Its quick development

Quick deployment: When a business opts for cloud computing and subscribes to a specific model, its entire system can be fully functional within a short time—even within a few minutes. The amount of time depends on the kind of technology and the business’s computing needs.


7 0
3 years ago
What type of device is OMR input or Output<br>​
slamgirl [31]

Answer

input

Explanation:

modern ones are now input

5 0
2 years ago
A group of statisticians at a local college has asked you to create a set of functions that compute the median and mode of a set
Vanyuwa [196]

Answer:

from functools import reduce

def mean(mylist):

   score = reduce(lambda x,y: x + y, mylist)/ len(mylist)

   return score

def median(mylist):

   sorted(mylist)

   list_len = len(mylist) % 2

   i = round(len(mylist)/2)

   x = len(mylist)//2

   if list_len == 0:

       median = (mylist[x] + mylist[x+1]) / 2  

   else:

       median = mylist[i]

   return median

def mode(mylist):

   unique = set(mylist)

   unique = list(unique)

   collector = [mylist.count(key) for key in unique]

   maxi = max(collector)

   loc = collector.index(maxi)

   return unique[loc]

def main():

   scores = input( 'Enter list of numbers: ').split(",")

   scores = [int(score) for score in scores]

   

   operation = input('Enter operation: ')

   operator = ['mean', 'median', 'mode']

   

   for x in iter(list, 0):

       if operation in operator:

           break

       print("Invalid operation: ")

       operation = input('Enter operation')

   

   index_loc = operator.index(operation)

   

   if index_loc == 0:

       return mean(scores)

   elif index_loc == 1:

       return median(scores)

       #return np.median(scores)  can be used of the defined function

   elif index_loc == 2:

       #return stats.mode(scores)[0]  can be used of the defined function

       return mode(scores)

print( main( ) )

Explanation:

The main python function calls conditionally three statistical functions namely mean, median and mode. It prompts for user input for a list of integer numbers and a function name name to return the corresponding result.

8 0
3 years ago
7.1 Write statements that create the following arrays: A 100-element int array referenced by the variable employeeNumbers. final
maria [59]

Answer:

A. int [ ] numbers = new int[employeeNumbers];

B. double[ ] numbers = new double[payRates];

C. float[ ] miles = new float[14];

D. char[ ] letters = new char[1000];

7.2 Size of array cannot be negative

Size of array should be a positive integer and not decimal.

7.4 The size declarator is used in a definition of an array to indicate the number of elements the array will have. A subscript is used to access a specific element in an array.

7.5 subscript to be out-of-bound means the specified integer is not within the range of the length of the array.

Explanation:

The question has answer given for some. I guess the explanation is what is needed.

A. The general format of creating an array is:

data type[] arrayRefVar=new datatype[size];

In this case, the datatype is int, arrayRefVar is numbers, size is employeeNumbers. The size was already initialised to 100 (employeeNumber).

B. A wrong datatype was used.

double[ ] numbers = new double[payRates];

would create an array of size 25 which is the payRates with types double.

C. The array was re-written using the general format of creating an array is:

data type[] arrayRefVar=new datatype[size];

D. The array was correctly defined.

7 0
4 years ago
A search can be performed on an array of ________ .
Arturiano [62]
Integers, Strings, and Objects. Hope this helped, have a great day! :D
6 0
3 years ago
Other questions:
  • An outdoor products company wants to test a new website design where customers can get information about their favorite outdoor
    6·1 answer
  • A ________ is a person or an organization that seeks to obtain or alter data or other IS assets illegally, without the owner's p
    9·1 answer
  • Given a double variable named areaofsquare write the necessary code to read in a value , the area of some square, into areaofsqu
    10·1 answer
  • Whatis the restriction placed on the push operation for an array-based implementation of a stack?
    13·1 answer
  • Ted is looking for a reliable source for his paper. Which of the following sites would be considered reliable?
    5·1 answer
  • Select the correct answer from each drop-down menu.
    10·1 answer
  • David wanted to build a Temple for God in________
    10·2 answers
  • In cell K8, create a formula using the SUM function that calculates the total of the range D17:D20 and subtracts it from the val
    6·1 answer
  • Please help will give brainliest
    12·1 answer
  • Write a function, called valFrequency, that given a list of values as a parameter, counts the frequencies for each value in the
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!