input: Write a function to generate a random string of length n made of uppercase letters and numbers. Return the generated string.
  assert generate_random_string(8)=="X7E6H4M3"
  assert generate_random_string(10)=="A3D5Q9Z2W1"
  assert generate_random_string(5)=="P7F2L"
output: import random
  import string
  
  def generate_random_string(n):
      return ''.join(random.choices(string.ascii_uppercase + string.digits, k=n))