M9) Counting nested loop output

The function in Listing 1 prints two messages inside nested loops.

Listing 1: Printing messages from nested for loops (Question 1).
def trace_nested_for_loop() -> None:
    # Report which loop is running.
    for i in range(1, 4):
        print("Outer Loop")
        for j in range(1, 3):
            print("Inner Loop")


trace_nested_for_loop()

How many times does trace_nested_for_loop print "Outer Loop" and "Inner Loop"?

  1. It prints "Outer Loop" and "Inner Loop" 3 times.
  2. It prints "Outer Loop" 3 times and "Inner Loop" 6 times.
  3. It prints "Outer Loop" 3 times and "Inner Loop" 2 times.
  4. It prints "Outer Loop" and "Inner Loop" once.