input: Write a function to print out the Pascal's triangle for a given number of rows. If the given number of rows is less than 1, the function should return False, otherwise, it should print the rows and return True.
  assert pascal_triangle(5)==True
  assert pascal_triangle(0)==False
  assert pascal_triangle(1)==True
  assert pascal_triangle(3)==True
  assert pascal_triangle(-1)==False
output: def pascal_triangle(n):
      if n < 1:
          return False
      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)))
      return True