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

 

jgreenawalt@ccboe.com ccpspython > middle1
prev  |  next  |  chance

Alpha and omega, the beginning and the end. Whatever you call them they are lost. If we start with more than one letter in the word then return the word without its first and last letter. If it is one letter long or shorter return the word sorry.


middle1('tree') → 're'
middle1('candle') → 'andl'
middle1('a') → 'sorry'

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

def middle1(word):

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

Copyright Nick Parlante 2017 - privacy