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:
let triangle = (n) => {
//clever things
};
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:
let triangle(5) =>
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:
let triangle(5) =>
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:
let triangle = (5) =>{//clever things}
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:
let triangle(5) =>
def triangle(5):
Output
expected output: PYRAMID PATTERN
*
**
***
****
*****
******
*******
******
*****
****
***
**
*