input: Write a python function to generate an infinite sequence of random numbers and print the first 10 random numbers.
  assert len(generate_and_print_random_numbers(10)) == 10
  assert all(0 <= num < 1 for num in generate_and_print_random_numbers(10))
output: import random
  
  def generate_and_print_random_numbers(n):
      random_numbers = []
      for _ in range(n):
          num = random.random()
          random_numbers.append(num)
          print(num)
      return random_numbers