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

how would you go about doing this
Write an equation of the line that passes through (2,−3) and is perpendicular to the line y=−2x−3.
help plz geometry !!!!​
Help please my brain hurts
Ed is constructing the perpendicular bisector of a segment on his paper. He just finished labeling the points of intersection of the two arcs that he drew. What
Use order of operations to solve the equation 10 - 5 x 2 + 24 divided by 12 + 6 - 7
Which of the following is correct about Julius Caesar, the first dictator of Rome? A was the founder of Rome B was born in India C was assassinated D he als
explain the system of feudalism
frictional force is ___of area of contact​
A population of western skinks, a type of lizard, lives in a grassland habitat along the base of a mountain range. The construction of a multi-lane highway will