Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 5 Given a list a, the max function in Python's standard library computes the largest element in a: max(a) . Similarly, min(a) returns the
Problem 5 Given a list a, the max function in Python's standard library computes the largest element in a: max(a) . Similarly, min(a) returns the smallest element in a . Write your own my_max and my_min functions. In [ ]: # YOUR CODE HERE raise Not ImplementedError() In [ ]: # YOUR CODE HERE raise Not ImplementedError() In [ ]: a = [0.28197719, 0.59580708, 0.54095388, 0.44264927, 0.12360858, 0.3067179, 0.33002426, 0.43553806, 0.14259775, 0.01909447] assert_equal(my_max(a), max(a)) assert_equal(my_min(a), min(a))
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started