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
MA_775_DIABLO [31]
3 years ago
10

Write a function that receives a one-dimensional array of integers and returns a Python tuple with two values - the minimum and

maximum values of the input array. The content of the input array must not be changed. You may assume that the input array will contain only integers, and will have at least one element. You do not need to check for these conditions. For full credit, the function must be implemented with O(N) complexity.
Computers and Technology
1 answer:
xenn [34]3 years ago
4 0

The function that receives array of integers and returns  the minimum and maximum values as a tuple is as follows:

def min_max(array):

    x = min(array)

    y = max(array)

    return (x, y)

print(min_max([4, 6, 7, 8, 1, 8, 14]))

<h3>Code explanation</h3>

The code is written in python.

  • We defined a function named "min_max". The function accepts a parameter called array.
  • The variable x is used to store the minimum value of the array.
  • The y variable is used to store the maximum value of the array.
  • Then, we return the minimum and maximum values as a tuple.
  • Finally, we call the function with the required parameter.

learn more on python here: brainly.com/question/13199913

You might be interested in
No Browsing History While using the browser on your tablet, you realize that it is not keeping a history of websites you have vi
My name is Ann [436]

Answer & Explanation:

No Browsing History:

  • Your browser is probably set to incognito mode, change it to general mode.
  • space set on your drive to save the content from your browser might be completely filled, Make sure you have given your browser enough space on your drive to save contents.
  • The number of days to record the history in your browser is set to 0, Check the settings and make sure it is not set to 0.

Phishing Scam

  • Change all the credentials on the site that you have disclosed.
  • Immediately report the mail to an IT department and necessary authorities.
  • Mark the mail as span and block the mail id.

Suspicious File Attachment

  • May be that the suspicious file contains a virus file. Often such viruses are attached to external "Show-case" files so that the victim is not able to identify them. Once the external file is tried to open, the virus slips into the main memory (your RAM) and start executing in the background, creating copies of itself and executing every copy. Soon they start eating up the main memory (The memory that runs all your programs) making your PC slow to respond.

Antivirus Software Outdated

  • Connected to the Internet and update the antivirus.

Laptop's Physical Security

  • Set a password.
  • install a tracking software.
4 0
3 years ago
A cloud data storage company develops a proprietary system of hardware and software, trains its systems analysts on the technolo
cupoosta [38]

Answer:

Creating Strategic Fit

Explanation:

Strategic fit expresses the degree to which an organization is matching its resources and capabilities with the opportunities in the external environment. The matching takes place through strategy and it is therefore vital that the company has the actual resources and capabilities to execute and support the strategy. Strategic fit can be used actively to evaluate the current strategic situation of a company as well as opportunities such as M&A and divestitures of organizational divisions.

7 0
3 years ago
What is the significance of the scientific method?
Gnom [1K]
Hello there! The significance of the scientific method is that it ensures accuracy and it ensures that the experiment was done in the right order.

The scientific method is a widely accepted way of revising and rechecking the work of scientists to see if:

1. The answers match up

2. The experiment was performed correctly

3. The results are accurate

Through the scientific method, the probability is very high that things will not go wrong. The significance of this is that if the scientific method is not applied to an experiment, nobody knows the results. If nobody knows the results, there are many possible unintended consequences that could happen. Hope this helps!
6 0
1 year ago
If str 1 and str2 are both Strings, which of the following expressions will correctly
Novosadov [1.4K]
Str1==str2 is the answer
3 0
4 years ago
How many days till earth ends
expeople1 [14]
Several Billion years
5 0
3 years ago
Other questions:
  • Okay so remember that page I was advertising? At: fol ? Now it's deleted. And idk why because I was doing everything the right w
    7·1 answer
  • You are setting up a desktop computer for an AutoCAD specialist who needs a minimum of 125GB of RAM. Which operating system belo
    6·1 answer
  • Your boss wants you to set up an authentication scheme in which employees will use smart cards to log in to the company network.
    15·1 answer
  • Which of the following is not a compilation error? Group of answer choices a. Placing a semicolon at the end of the first line o
    13·1 answer
  • Rose opens her software application and gets a message stating that she has only 16 more uses of the product available. Given th
    15·1 answer
  • What are workplace human relations
    10·1 answer
  • Select which is true for for loop​
    11·1 answer
  • In which situation is coauthoring of presentations primarily utilized?
    9·1 answer
  • SOMEONE HELP 60 POINTS!!!!! When creating business publications, these two factors must be determined before planning the layout
    8·2 answers
  • How many times will the loop body execute:
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!