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

 

dsawyer@methacton.org > first3
prev  |  next  |  chance

Complete the function so that it returns a list that contains the three smallest values from the list. There will be at least 3 numbers in the list and there will be no duplicate values.


first3([55, 31, 9, 2, 13, 7]) → [2, 7, 9]
first3([18, 32, 17]) → [17, 18, 32]
first3([8, 7, 6, 5, 4, 3, 2]) → [2, 3, 4]

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

def first3( 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 Post-solution available

Copyright Nick Parlante 2017 - privacy