'''
Write a function pattern(h), where h is the parameter that defines the height of the following pattern.
the pattern prints out the half-hollow pyramid, as shown in the test cases below.
Note: You do not need to return anything from the function, just have it print directly.
pattern(5):
*
**
* *
* *
*****
'''
def pattern(h):
# write your code here :D