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
frozen [14]
3 years ago
9

Write a new function called "listmax" based on the following IPO # function: listmax # INPUT: a list # PROCESSING: obtains the l

argest element in the list # OUTPUT: returns the largest element in the list Make sure that you DO NOT use the "max" function in your program. You cannot assume that the list supplied will be non-empty - if this is the case your function should return the value None. You can assume that the supplied list contains data elements of the same type (i.e. the list will contain all strings, or all ints, or all floats, or all Boolean values). Here is a sample running of this program: mylist = [10, 20, 30] x = listmax(mylist) print (x) >> 30
Computers and Technology
1 answer:
hammer [34]3 years ago
5 0

Answer:

See Explaination

Explanation:

def listmax(lst):

largest = None

for num in lst:

if largest is None or num > largest:

largest = num

return largest

mylist = [10, 20, 30]

x = listmax(mylist)

print(x)

You might be interested in
When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.
faltersainse [42]

Answer:

Parameter

Explanation:

q: When an application contains just one version of a method, you can call the method using a(n) ____ of the correct data type.

a: Parameter

3 0
3 years ago
Write a program to enter a number and test if it is greater than 45.6. If the number entered is greater than 45.6, the program n
Sunny_sXe [5.5K]
Here is the solution. Let me know if you have any question

5 0
3 years ago
In c++ 11, the ________ tells the compiler to determine the variable's data type from the initialization value.
sergiy2304 [10]
<span>In describing an Initialization is when a value is assigned to a variable as part of the variable's definition or the assinged values to variables are defined whenever. 

The best answer would be is that they present the keyword,  when they tell the compiler.</span>
3 0
3 years ago
Branching is so called because <br>​
ollegr [7]

Anhskmsknsk

Explanation:

jhjdmsmyessi

6 0
3 years ago
Read 2 more answers
What is the difference between a switch and a hub?
marta [7]

Explanation:

A hub is used to send the message from one port to other ports.It does not know the specific address of the destination where the message needs to send.it works on Physical layer of the OSI model(layer 1).

A switch can handle data and it knows the specific address of the destination.A switch works on the data link Layer of the OSI model(layer 2).

8 0
3 years ago
Other questions:
  • The computers that run the DBMS and all devices that store database data should reside in locked, controlled-access facilities.
    15·1 answer
  • How is typing speed measured
    12·2 answers
  • This type of peripheral is used to interact with, or send data to, the computer.
    12·2 answers
  • 30
    5·1 answer
  • What are 2 plants that grow best in our soil type ​
    9·1 answer
  • When does a soft page break occur in a document
    9·1 answer
  • Which of the following popular presentation software items do you have to purchase in order to use?
    11·2 answers
  • Please answer this simple (hard) question for me lol
    13·2 answers
  • Consider that a man is watching a picture of a Black Horse. He receives an external stimulus from input channel. Man gains some
    14·1 answer
  • Task 2
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!