subject

#write a function called alter_list. alter_list should have#two parameters: a list of strings and a list of integers.##the list of integers will represent indices for the list of#strings. alter_list should alter the capitalization of all#the words at the designated indices. if the word was all#capitals, it should become all lower case. if it was all#lower case, it should become all capitals. you may assume#that the words will already be all-caps or all-lower case.##for example: ## string_list = ["hello", "world", "how", "are", "you"]# index_list = [0, 2]# alter_list(string_list, index_list) -> # ["hello", "world", "how", "are", "you"]##after calling alter_list, the strings at indices 0 and 2#have switched their capitalization. ##note that it may be the case that the same index is present#in the second twice. if this happens, you should switch the#text at that index twice. for example: ## string_list = ["hello", "world", "how", "are", "you"]# index_list = [0, 2, 2]# alter_list(string_list, index_list) -> # ["hello", "world", "how", "are", "you"]##2 is in index_list twice, so the string at index 2 is#switched twice: capitals to lower case, then back to#capitals.#write your function here! #below are some lines of code that will test your function.#you can change the value of the variable(s) to test your#function with different inputs.##if your function works correctly, this will originally#print: #["hello", "world", "how", "are", "you"]#["hello", "world", "how", "are", "you"]print(alter_list(["hello", "world", "how", "are", "you"], [0, 2]))print(alter_list(["hello", "world", "how", "are", "you"], [0, 2, 2]))

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 22.06.2019 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
You know the right answer?
#write a function called alter_list. alter_list should have#two parameters: a list of strings and a...
Questions
question
Social Studies, 12.07.2019 06:20
Questions on the website: 13722361