<prompt> Kujenga algorithm ya alphabetizing orodha ifuatayo.Tembo, zebra, nyani, mchwa  <response>: 1. Start by defining the input list: input_list elephant, zebra, monkey, ant2. Create an empty list called sorted_list, where we will store our sorted elements.3. Initiate a while loop: 1. Within the loop, find the smallest element in the input_list by creating a variable smallest and setting its value to the first element of the input_list. 2. Use a for loop to iterate over each element in the input_list and compare it with the smallest element. If the element is alphabetically smaller than the smallest element, then update the value of smallest to that element. 3. After the for loop, remove the smallest element from the input_list and append it to the sorted_list.4. End the while loop when the input_list is empty.5. sorted_list now contains the input elements sorted alphabetically.Here is the complete code:def alphabetizeinput_list: sorted_list while input_list: smallest input_list0 for element in input_list: if element smallest: smallest element sorted_list.appendsmallest input_list.removesmallest return sorted_listprintalphabetizeelephant, zebra, monkey, ant 