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

if its 10:24 a.m. and i need to finish my online school work by 12:50 pm how much time do i have to d do my work?
true or false: the height from which cliff divers jump affects the velocity at which they will fall. velocity is speed in a certain direction.
2. The seventh grade class is putting on a variety show to raise money. It cost $700 to rent the banquet hall that they are going to use. If they charge $15 for
Is it true people with schizophrenia always behave in predictable ways
Solve the equation for W
What number is greater than 271,680 but less than 276,108
What is the mass grams of 0.0135 mol of the element sodium, Na?
is 89.396668 ratinal or irrational
Find the width and height of a newer 65" television screen with an aspect ratio of 16:9.
Which value of x is the solution of the equation (2/3)x+(1/2) =(5/6)