input: Write a function to generate a random number within the range [0, 10). The function should return the random number.
  assert random_generator()==x, where x is a random integer from 0 to 9
  assert type(random_generator())==int
output: import random
  
  def random_generator():
      return random.randint(0, 9)