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

 

bryce.hulett@hotmail.com > sort_three
prev  |  next  |  chance

Given 3 strings, return them in alphabetical order. Invoking sort_three("eat", "sleep", "code") returns "code eat sleep". Lots of ways to solve this one. One approach is using the built-in functions min and max then find the middle element.


sort_three('eat', 'sleep', 'code') → 'code eat sleep'
sort_three('dog', 'cat', 'ant') → 'ant cat dog'
sort_three('dogma', 'dogmatic', 'dog') → 'dog dogma dogmatic'

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

def sort_three(a, b, c):

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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy