input: Write a python function to generate a right-aligned pattern of stars with decreasing number of spaces.
  assert generate_pattern(5) == ['*****', '**** ', '***  ', '**   ', '*   ']
  assert generate_pattern(3) == ['***', '** ', '*  ']
  assert generate_pattern(1) == ['*']
output: def generate_pattern(n):
      return ['*' * (n - i) + ' ' * i for i in range(n)]