6 kyu
ASCII Fun #4: Build a pyramid
170 of 317zruF
Description:
Build a pyramid
You will get a string s
with an even length, and an integer n
which represents the height of the pyramid and your task is to draw the following pattern. Each line is seperated with "\n"
.
n
will always be greater than 3. No need to check for invalid parameters- There are no whitespaces at the end of the lines
Example
build_pyramid("00-00..00-00", 7)
should return:
00-00..00-00
0000--0000....0000--0000
000000---000000......000000---000000
00000000----00000000........00000000----00000000
0000000000-----0000000000..........0000000000-----0000000000
000000000000------000000000000............000000000000------000000000000
00000000000000-------00000000000000..............00000000000000-------00000000000000
Serie: ASCII Fun
ASCII Art
Similar Kata:
Stats:
Created | Jun 21, 2017 |
Published | Jun 21, 2017 |
Warriors Trained | 705 |
Total Skips | 5 |
Total Code Submissions | 1728 |
Total Times Completed | 317 |
JavaScript Completions | 170 |
CoffeeScript Completions | 9 |
Python Completions | 157 |
Total Stars | 22 |
% of votes with a positive feedback rating | 95% of 100 |
Total "Very Satisfied" Votes | 91 |
Total "Somewhat Satisfied" Votes | 8 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 6 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 6 kyu |