Ask Question

Write a function swaparrayends () that swaps the first and last elements of the function's array parameter. ex: sortarray

+1
Answers (1)
  1. 8 April, 06:37
    0
    Def swapArrayEnds (array):

    tmp = array[ len (array) - 1 ]

    array[ len (array) - 1 ] = array[ 0 ]

    array[ 0 ] = tmp
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a function swaparrayends () that swaps the first and last elements of the function's array parameter. ex: sortarray ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers