input: Write a function to generate and print a Pascal triangle with a specified number of rows. If the input is an invalid number of rows (less than 1), return False.
  def PascalTriangle(n):
      if n < 1:
          return False
      arr = [0 for i in range(n)]
      for line in range(0, n):
          for i in range (0, line + 1):
              if (i == 0 or i == line):
                  arr[i] = 1
              else:
                  arr[i] = arr[i] + arr[i - 1]
          for i in range (0, line + 1):
              print(arr[i], end =" ")
          print()
      return True
  
  assert PascalTriangle(5)==True
  assert PascalTriangle(3)==True
  assert PascalTriangle(0)==False
  assert PascalTriangle(-1)==False
  assert PascalTriangle(1)==True
output: def PascalTriangle(n):
      if n < 1:
          return False
      arr = [0 for i in range(n)]
      for line in range(0, n):
          for i in range (0, line + 1):
              if (i == 0 or i == line):
                  arr[i] = 1
              else:
                  arr[i] = arr[i] + arr[i - 1]
          for i in range (0, line + 1):
              print(arr[i], end =" ")
          print()
      return True