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 do you find the vertex of 2x^2+2x+10
The local school sponsored a mini-marathon and supplied 68 gallons of water per hour for the runners. What is the amount of water in quarts per hour? 136 qt/h
the total cost C for g grams of igneous rock if each gram costs $3.81
An escalator at a mall moves at a pace of 1.6 feet per second. If Kim stands on the escalator as it moves, how long will it take her to travel 80 feet?
The chapter animal needs by Kevin Barry What is it about
can anyone solve 20 and 19?
an experiment was done to determine if the rate at which an egg cooked depended on the temperature of water in which was boiled .what is the independent variabl
Please solve 9. #9 please show a picture and do the steps
Confucius served as a teacher spreading his ideas; he tried to work in government to bring positive changes. True False PLEASE I NEED HELP !!!!!!!!
When equations have variables on both sides such as 3x + 6 = 5x -2, you should move the variables to one side of the equation to simplify. What might your firs