Stars

In this exercise, we are going to print a lots of stars.
  1. Define a function star(m) so that it will print out m rows of star, where each row consists of 3 consecutive stars.
    M = ? 5
    ***
    ***
    ***
    ***
    ***
    
  2. Define a function star(n) so that it will print out n consecutive stars in a row.
    M = ? 6
    ******
    
  3. Define a functin star(m,n) so that it will print out m rows, each row consisting of n stars.
    M = ? 3
    N = ? 7
    *******
    *******
    *******
    
  4. (Advanced) Define a function triangle(n) so that it will print out n rows. The 1st row consists of 1 star. The 2nd row consists of 2 stars. The 3rd row consists of 3 stars. The nth row consists of n stars.
    N = ? 5
    
    *
    **
    ***
    ****
    *****