Ask Question
25 May, 10:10

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

+1
Answers (1)
  1. 25 May, 10:53
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers