input: Write a function to solve the "Tower of Hanoi" game for a given number of disks. The function should print the moves required to solve the problem. If there is only one disk, move it directly to the target rod. For more disks, first move all but the last disk to the auxiliary rod, then move the last disk to the target rod, and finally move the remaining disks from the auxiliary rod to the target rod.
  
  def solveTowerOfHanoi(num_disks, start_rod = 'A', end_rod = 'C', aux_rod = 'B'): 
      if num_disks == 1: 
          print("Move disk 1 from rod", start_rod, "to rod", end_rod) 
          return
      solveTowerOfHanoi(num_disks - 1, start_rod, aux_rod, end_rod) 
      print("Move disk", num_disks, "from rod", start_rod, "to rod", end_rod) 
      solveTowerOfHanoi(num_disks - 1, aux_rod, end_rod, start_rod) 
    
    
  # Driver code 
  num_disks = 4
  solveTowerOfHanoi(num_disks)
  
  assert solveTowerOfHanoi(1) == None 
  assert solveTowerOfHanoi(2) == None 
  assert solveTowerOfHanoi(3) == None 
  assert solveTowerOfHanoi(4) == None 
  assert solveTowerOfHanoi(5) == None
output: def solveTowerOfHanoi(num_disks, start_rod = 'A', end_rod = 'C', aux_rod = 'B'): 
      if num_disks == 1: 
          print("Move disk 1 from rod", start_rod, "to rod", end_rod) 
          return
      solveTowerOfHanoi(num_disks - 1, start_rod, aux_rod, end_rod) 
      print("Move disk", num_disks, "from rod", start_rod, "to rod", end_rod) 
      solveTowerOfHanoi(num_disks - 1, aux_rod, end_rod, start_rod)