Markynsai Markynsai
  • 02-03-2021
  • Computers and Technology
contestada

Need help with a program to search to sort elements in an array.(increasing or decreasing order)

Respuesta :

60002135330 60002135330
  • 02-03-2021

This is for Python

numbers = [7, 3, 6, 9, 0]

print(numbers.sort())

Output: [0, 3, 6, 7, 9]

numbers = [7, 3, 6, 9, 0]

print(numbers.sort(reverse = True))

Output: [9, 7, 6, 3, 0]

Answer Link

Otras preguntas

Groups of organs that work together to complete a process in the body are called: cells tissues nerves systems
what body of water is found west of the caucasus mountains? lake Baikal Volga river black sea Baltic sea
Which one is prime number 2, 3, 5, 7, 13, 14, 15, 23, 25, 29, 30, 36, 61
Monochromatic light passes through two parallel narrow slits and forms an interference pattern on a screen. As the distance between the two slits is decreased,
The number one factor for determining what living things can survive in a body of water is
Solve the equation using square roots. x^2 - 9 = 0
A dwarf sea horse swims at a rate of 49.68 feet per hour .convert this speed to inches per minute
1/5(2x - 15) + 3/5x =44/5
A physical change occurs when a material changes shape or size but the composition of the material does not change. True or False?
Determine the slope of y=2x^2-4x+2.