input: Write a function to generate a random number between the given input numbers. The function should take two parameters, start and stop, which define the range within which the random number should be generated. The function should return the random number. If the given range is invalid (e.g., start is greater than stop), the function should return None.
  assert random_num(0, 10)==5
  assert random_num(0, 10)==7
  assert random_num(0, 10)==10
  assert random_num(10, 0)==None
  assert random_num(-5, 5)==0
output: import random
  
  def random_num(start, stop):
      if start > stop:
          return None
      return random.randint(start, stop)