7 kyu

Return pyramids

641 of 1,381josemanuel.rincon

Description:

The task is very simple.

You must to return pyramids. Given a number n you print a pyramid with n floors

For example , given a n=4 you must to print this pyramid:

   /\
  /  \
 /    \
/______\ 
   

Other example, given a n=6 you must to print this pyramid:

     /\
    /  \
   /    \
  /      \
 /        \
/__________\

Another example, given a n=10, you must to print this pyramid:

         /\
        /  \
       /    \
      /      \
     /        \
    /          \
   /            \
  /              \
 /                \
/__________________\

Note: a line feed character is needed at the end of the string. Case n=0 should so return "\n".

Strings
Algorithms
ASCII Art
Puzzles

Stats:

CreatedNov 27, 2017
PublishedNov 27, 2017
Warriors Trained3328
Total Skips53
Total Code Submissions5747
Total Times Completed1381
Python Completions641
Crystal Completions8
Ruby Completions70
C++ Completions225
JavaScript Completions442
C Completions68
Total Stars52
% of votes with a positive feedback rating87% of 307
Total "Very Satisfied" Votes243
Total "Somewhat Satisfied" Votes51
Total "Not Satisfied" Votes13
Total Rank Assessments6
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • josemanuel.rincon Avatar
  • GiacomoSorbi Avatar
  • Blind4Basics Avatar
  • rowcased Avatar
  • Just4FunCoder Avatar
  • farhanaditya Avatar
  • saudiGuy Avatar
Ad