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

Brayson buys 64 plastic miniature dolls. could he distribute them equally into 6 containers and have nothing left over
Why are most hindus are vegtarians?
Why was succession important in england in 1688?
Find the value of 7-2x when x=-3
How dose the mood of a story affect the reader?
Simplify the expression. 8 ( 5 + t ) - 6 ( t + 1)
Why was nelson mandela admired?
A quadrilateral is inscribed in a circle. It's vertices divide the circle into four consecutive arcs in the ratio 1:2:5:4. Find the angles of the quadrilateral.
solve the system of equation y=1/2x-2 and 3x+y=5
plez help"the cost of airing a commercial on television is modeled by the function C(n) = 110n + 900, where n is the number of times the commercial is aried. Ba