input: Write a function to generate and print a Pascal's triangle with the given number of rows. The function should take an integer 'n' as input and print the Pascal's triangle with 'n' rows. If 'n' is zero or negative, the function should not print anything.
  assert PascalTriangle(5)
  assert PascalTriangle(0)
  assert PascalTriangle(-1)
output: def PascalTriangle(n):
      if n <= 0:
          return
      triangle = [[1]]
      for i in range(1, n):
          row = [1]
          for j in range(1, i):
              row.append(triangle[i-1][j-1] + triangle[i-1][j])
          row.append(1)
          triangle.append(row)
      for row in triangle:
          print(' '.join(map(str, row)).center(n*3))