Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Steps generator

Instructions

Given a positive integer n implement a function which returns a list representing the generated steps with n levels using the # character. Make sure the step has appropriate number of spaces on the right hand side!

Challenge | Solution

Examples

steps(2)
    '# '
    '##'

steps(3)
    '#  '
    '## '
    '###'

steps(4)
    '#   '
    '##  '
    '### '
    '####'