id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

List-1 > max_end3
prev  |  next  |  chance

Given an array of ints length 3, figure out which is larger, the first or last element 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 (ctrl-enter)

def max_end3(nums):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 124.0 Post-solution available

Copyright Nick Parlante 2017 - privacy