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
slavikrds [6]
3 years ago
13

g create your own min function that finds the minimum element in a list and use it in a separate function

Computers and Technology
1 answer:
skelet666 [1.2K]3 years ago
7 0

Answer:

Following are the code to this question:

def min_function(x):#defining a method min_function

   mini= x[0]#defining a variable to hold list value

   for i in x[1:]:#defining for loop to count values

       if i < mini: #defining if block to check minimum value

           mini = i #holding minimum value in mini variable

   return (mini)#return value

print(min_function([9,8,7,6,5,4,3,2,1,11,19]))#use print method to call min_function

Output:

1

Explanation:

In the above code, a method min_function is defined, that holds a list as the parameter and inside the method, a mini variable is defined, that holds a list value and use a for loop to define a condition to check the minimum value in the list and store its value in a mini variable and use a return keyword to return its value.

At the last print, the method is used to call the above method with accepting list values.

You might be interested in
Match the different sources of payments to their descriptions. an electronic device that aids consumers to make online payments
LekaFEV [45]

<u>Automatic Draft-</u> A convenient payment method where funds are automatically debited from your account.

<u>Cash-</u> The physical form of currency.

<u>Credit Card-</u> Allows you to make a purchase and pay for it later.

<u>Digital Wallet-</u> An electronic device that aids consumers to make online payments through various websites.

For anyone still looking, hope this helps.

6 0
3 years ago
The process of _____ determines what volume a system can handle by comparing its performance to standards in the industry? horiz
Alina [70]

BENCHMARKING

option C

5 0
3 years ago
Read 2 more answers
What service converts ip addresses into more recognizable alphanumeric names??
tresset_1 [31]
I think is DNS..........
6 0
4 years ago
What technology would it take to make a balloon that doesn't pop?
SpyIntel [72]
The balloon has to be made out of old truck tiers at lest 20 ilb
7 0
4 years ago
What does the hard disk drive do?
Airida [17]
It stores data and retrieving digital information using one or more rigid rapidly rotating disks (platters) coated in magnetic material
4 0
4 years ago
Read 2 more answers
Other questions:
  • A ____ document identifies the purpose of the program being developed, the application title, the procedures to be followed when
    11·1 answer
  • Examples of algorithm
    5·1 answer
  • Which of the following resources is an example of a web-based application?
    15·1 answer
  • Which technology can be used to protect the privacy rights of individuals and simultaneously allow organizations to analyze data
    13·1 answer
  • Assume we perform a known-plaintext attack against DES with one pair of plaintext and ciphertext. How many keys do we have to te
    14·1 answer
  • 2. Select the things you can do when working with rows in columns in a spreadsheet:
    5·1 answer
  • A soft news story and a feature story are the same thing.<br> O True<br> O False<br> HELLPP ASSAAAP
    12·2 answers
  • Explain why the process of sketching in engineering might resemble a loop or a cycle.
    15·2 answers
  • Consider the following statements regarding computers:
    5·1 answer
  • Why aren't my skullcandy bluetooth headphones connecting to my school chromebook if I turned on both the headphones and the blue
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!