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
What are language standards? At this point in your study of programming, what do they mean to
garri49 [273]
In computing, a programming language specification (or standard or definition) is a documentation artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.
5 0
3 years ago
Define inheritance. give an example
Nezavi [6.7K]
A class can be defined<span> using another class as a foundation. In object-oriented programming terminology, one class can </span>inherit<span> fi elds and methods from another. An object that inherits from another is called a subclass, and the object it inherits from is called a superclass. A subclass extends the superclass.</span>
3 0
3 years ago
Complete the sentence with the correct response.
Fiesta28 [93]

Answer:

Material systems developer typically combines the skills of a programmer with the multitasking expectations of developing 3 dimensional models of objects, enhancing the graphical effects.

6 0
2 years ago
How are special characters added to a Word document? Check all that apply.
MrRissso [65]

It kinda depends on what you mean by special characters

7 0
3 years ago
Read 2 more answers
HELPPP!!! ASAP *What are the purposes of a good web page?*
Brrunno [24]

I would say functional and straightforward

4 0
3 years ago
Other questions:
  • In a video, a motionless image is called
    7·2 answers
  • Businesses have taken advantage of many of the smart phone features to promote their business. TRUE OR FALSE
    5·2 answers
  • Oday's color display devices represent color using the ______ color model.â
    13·1 answer
  • 3. The term integration refers to the ability to
    6·1 answer
  • Which one my guys I need help
    7·1 answer
  • 4.11 lesson practice quizz need help on 2 and 3
    5·1 answer
  • What is the difference between electrical and electronic devices?
    5·2 answers
  • Write a program that reads a list of integers, and outputs whether the list contains all even numbers, odd numbers, or neither.
    5·1 answer
  • Briefly describe the working of computer processing system?
    11·1 answer
  • Continue your S3 and S4 assignment for a young soccer league with the following specification. Do not include the previous queri
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!