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



stretchString(myString, stretch_number) -- given a string myString and an integer stretch_number, return a string in which each character of the original string is repeated stretch_number times.

stretchString('banana', 2) → 'bbaannaannaa'
stretchString('apple', 3) → 'aaappppppllleee'
stretchString('fig', 4) → 'ffffiiiigggg'

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

def stretchString(myString, stretch_number):

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

Post-solution available

Copyright Nick Parlante 2017 - privacy