--- title: Pyramids pre: "2. " weight: 5 # available_flavours: ["any_language"] # submission_type: repo --- ## Pyramids **1.** Write a function that takes in number as argument and draws a pyramid triangle above using the " \* " characters . If the input is 4, then the output is a traingle shaped as pyramid with height 4. **Input**: ```js let triangle = (n) => { //clever things }; ``` ```py def triangle(5): ``` **Output** ``` expected output: PYRAMID TRIANGLE. * *** ***** ******* ********* ``` **2.** Write a function that takes in number as argument and draws a Hollow pyramid triangle above using the " \* " characters . If the input is 4, then the output is a traingle shaped as pyramid with height 4 **Input**: ```js let triangle(5) => ``` ```py def traingle(n): ``` **Output** ``` expected output: HOLLOW RIGHT ANGLE TRIANGLE AND FOR ITS MIRROR. * * * * * * * *********** ``` **3.** Write a function that takes in number as argument and draws a pyramid triangle above using the " \* " characters . If the input is 4, then the output is a traingle shaped as pyramid with height 4 **Input**: ```js let triangle(5) => ``` ```py def triangle(5): ``` **Output** ``` expected output: PYRAMID PATTERN * ** *** **** ***** ****** ******* ****** ***** **** *** ** * ``` **4.** Write a function that takes in number as argument and draws a pyramid triangle above using the " \* " characters . If the input is 4, then the output is a traingle shaped as pyramid with height 4 **Input**: ```js let triangle = (5) =>{//clever things} ``` ```py def triangle(n): ``` **Output** ``` expected output: PYRAMID PATTERN ************* *********** ********* ******* ***** *** * ``` **5.** Write a function that takes in number as argument and draws a pyramid triangle above using the " \* " characters . If the input is 4, then the output is a traingle shaped as pyramid with height 4 **Input**: ```js let triangle(5) => ``` ```py def triangle(5): ``` **Output** ``` expected output: PYRAMID PATTERN * ** *** **** ***** ****** ******* ****** ***** **** *** ** * ```