about | help | code help+videos | done | prefs |
blocksToWall
A Block is composed of two enclosing X symbols, and - in between. The length of the Block denotes the number of - symbols. Thus, a block of length 3 is "X---X", and a Block of length 1 is "X-X". Write a function that accepts the number of blocks and their length as integers, and return a string representing them. blocksToWall(1, 3) → "X---X" blocksToWall(2, 1) → "X-XX-X" blocksToWall(3, 0) → "XXXXXX" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy