input: def PascalTriangle(n):
      """Generate and print a Pascal triangle with the given number of rows.
      >>> PascalTriangle(5)
      1 
      1 1 
      1 2 1 
      1 3 3 1 
      1 4 6 4 1 
      """
output:     triangle = [[1] * (i + 1) for i in range(n)]
      for i in range(2, n):
          for j in range(1, i):
              triangle[i][j] = triangle[i-1][j-1] + triangle[i-1][j]
      for row in triangle:
          print(" ".join(map(str, row)))