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]
4 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]4 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
Which of the following enables robots to do things such as understand itself, walk, talk, and develop skills?
zmey [24]

Answer:

self-modeling

Explanation:

Robots, which are man-made machines which mimics the actions of man like walking, talking, rendering assistance are part of the future plans to make the society easier. It was mans' attempt to improve the society but still happens to be work in progress.

For the robots to be able to carryout its function, there is need for it to be self modelling in the sense of initiating and executing the commands which was already programmed into it. <em>For example, telling it to walk will be initiated by him as a command, after processing the command, it will execute it without any other information.</em>

7 0
3 years ago
What are 5 different google g-suite tools that you can use to collaborate and communicate with othe
Tomtit [17]

it is google docs like stuff made by google

7 0
3 years ago
Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
Grace [21]

Answer

calculator calc;

Explanation

An object is an instance of a class. And a class is what defines or describes the behavior or the state of the object of its type. When a class is defined no memory is allocated until when an object is created memory is allocated.

4 0
3 years ago
Read 2 more answers
In 3-4 sentences, write a note to a friend describ
sladkih [1.3K]

you can copy and paste your text.

7 0
3 years ago
Read 2 more answers
Who wants to join my go.ogle classroom?
Ostrovityanka [42]

Answer:

sure

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • What is the relationship between IaaS and TCP/IP and network services?
    10·2 answers
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • While editing a film, a director feels that the actors have not enacted a particular scene well. What type of shot must the dire
    12·1 answer
  • Correct single error in this. Try to appear relaxed, but not to relaxed​
    13·1 answer
  • Dispositivo de computo
    5·1 answer
  • What one main difference between social media and traditional media such as television?
    12·2 answers
  • What is the function of ROM?
    10·1 answer
  • On the new iOS version, can you save photos from ‘review confirmed photos’? If so, how? Thanks!
    10·1 answer
  • Philip took pictures with his smartphone and save them into his computer unless you delete the photos from the computer they wil
    12·1 answer
  • 2.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!