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

 

rmueller@lasacs.com final2020period1 > allAboutStringsPart2
prev  |  next  |  chance

Given a string with at least 3 characters return a list of its

  1) length
  2) first character
  3) last character
  4) middle character if it has an odd number of characters, else middle two characters

allAboutStringsPart2('LASA') → [4, 'L', 'A', 'AS']
allAboutStringsPart2('Computer') → [8, 'C', 'r', 'pu']
allAboutStringsPart2('Science') → [7, 'S', 'e', 'e']

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

def allAboutStringsPart2(string):

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

Copyright Nick Parlante 2017 - privacy