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

 

rnewton31@gatech.edu > argmax
prev  |  next  |  chance

Given a list of ints, return the index of the first occurrence of the largest element in the list. The list will be length 1 or more.


argmax([-2, 5]) → 1
argmax([-10]) → 0
argmax([1, 2, 3, 3, 2]) → 2

...Save, Compile, Run (ctrl-enter)

def argmax(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: 250

Copyright Nick Parlante 2017 - privacy