codybrocs7001 codybrocs7001
  • 06-12-2017
  • Computers and Technology
contestada

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

Respuesta :

rsmith6559
rsmith6559 rsmith6559
  • 07-12-2017
def swapArrayEnds( array ):
    tmp = array[ len( array ) - 1 ]
    array[ len( array ) - 1 ] = array[ 0 ]
    array[ 0 ] = tmp


Answer Link

Otras preguntas

The school is able to buy dozen roses for $9.36.The roses will be sold with a 150% markup. For what price the school sell 1 dozen roses
3x+y=5  2x-2y=-2 solving systems of equations
What is the lowest common multiple of (2,6)
WHAT IS 1/3 TO THE TENTH POWER IN FRACTION FORM?AND WHAT IS (1/3)^10 x 9^4[tex](( \frac{1}{3}) ^{10}) 9^4[/tex]1/3 to the tenth power times 9 to the 4th power
Are there more adults(18 or over) than kids in this world?
what color represents the highest temperature
the sales tax on a used truck is 600 dollars. If the tax rate is 6%. Find the purchase price of the truck
a pizza is divided into 12 equal slice.4 slices have mushrooms only.2 slices have mushrooms and pepperoni.6 slices have pepperoni only.write two equivalent frac
a meter is one thousandth of a kilometer . write an equation to show the relationship between 962 meters and 0.962 kilometers
Using the subject “usted” and the verb in the imperative, tell your fitness instructor three things she or he must do. Then tell your fitness instructor two thi