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