| about | help | done | prefs | create account |
Python > List-1 > max_end3
prev | next | chance
| Given an array of ints length 3, figure out which is larger between the first and last elements in the array, and set all the other elements to be that value. Return the changed array.
max_end3([1, 2, 3]) → [3, 3, 3] max_end3([11, 5, 9]) → [11, 11, 11] max_end3([2, 11, 3]) → [3, 3, 3] ...Save, Compile, Run See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean |
Forget It! -- delete my code for this problem 124.0
Copyright Nick Parlante 2006-10 - privacy