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

Which city did Muhammad return to and declare the holiest city in Islam?
Aspirin is a widely used drug. What kind of medicine is it?
If your goal is to find a mentor who can help encourage you, which category would it fall into?
Brinn's rectangular kitchen has an area of 81 square feet. The kitchen is 9 times as many square feet as Brinn's pantry. If the rectangular pantry is 3 feet wid
If the root thermo- means "heat," which does thermodynamics mean?
What is the sign of the product of three integers with the same sign
Which of the following statements is true? A. 15 + 0 = 0 B. 15 – 0 = 0 C. 0 ÷ 15 = 0 D. 15 ÷ 0 = 0
find the dimensions of a box that will hold twice as many cubes as a box that is 4 by 2 by 9
You are creating identical candy bags using 18 chocolate bars and 30 peanut butter cups. What is the greatest number of bags you can fill using all the candy? S
(PLEASE HELP) What area of the Earth's mantle is the densest? A.The entire mantle has the same density. B.the area nearest to the Earth's crust C.the area in-