--- title: Triangles pre: "4. " weight: 5 # available_flavours: ["any_language"] # submission_type: repo --- ## Print (triangles & squares) using loops **1.** Write a function that takes in number as argument and draws a right angled triangle using the " \* " characters. If the input is 4, then the output is a traingle with height 4 **Input** ```js let triangle(4) => ``` ```py def triangle(n): ``` **Output** ``` expected output: RIGHT ANGLE TRIANGLE * ** *** **** ``` **2.** Write a function that takes in number as argument and draws a reflection/mirror of right angled triangle above using the " \* " characters . If the input is 4, then the output is a traingle with height 4 **Input** ```js let triangle(5) => ``` ```py def triangle(n): ``` **Output** ``` expected output: MIRROR OF RIGHT ANGLE TRIANGLE * ** *** **** ``` **3.** Write a function that takes in number as argument and draws a Hollow right angled triangle above using the " \* " characters . If the input is 4, then the output is a traingle with height 4 ```js //javascript function triangle(5) ``` ```py def trianlge(n): ``` ``` expected output => HOLLOW RIGHT ANGLE TRIANGLE AND FOR ITS MIRROR. * * * * * * * ****** ```