An algorithm is designed to display a list of active sensor locations in a smart home system.
1 # ----- Global variables -----
2 sensorLocations = ["Kitchen", "Hallway", "Garage", "Garden"]
3
4 # ----- Subprograms -----
5 def showRecords (recordList):
6 for index in range (0, len (recordList)):
7 print (index + 1, "-", recordList[index])
8
9 # ----- Main Program -----
10 viewChoice = input ("Display sensor locations? (Y/N) ")
11 if viewChoice.upper() == "Y":
12 showRecords (sensorLocations)
13 else:
14 print ("Goodbye")
State the name of the computational thinking technique that is used by defining the subprogram showRecords() to hide the inner details of how the list is formatted and output, allowing the main program to focus only on calling the function.