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

write a letter to your friend telling him about some of the interesting things going on in your life​
What kind of molecule is formed when glucose and fructose are combined.
10x-9y= 24, Y= x-2 X =? Y=?
A 102.1 kg cannon at rest contains a 9.8 kg cannon ball. When fired, the cannon ball leaves the cannon with a speed of 88.03 m/s. What is the recoil speed of th
William Morris was a founder of the________. A. Modern Art Movement B. Arts and Crafts Movement C. The Impressionist style D. The MOMA
__________ treats cancer by removing it. A. Chemotherapy B. Immunotherapy C. Surgery D. Hormones Please select the best answer from the choices provided. A B C
Which couple has the most expensive divorce settlement of all time?.
What is the equation of the line that is the parallel to x - 8y = 16 and passes throguh the point (-8, 2)
A pool has the perimeter of 36 meters. The length of one side is 10 meters. What is the width of the pool?
Which category of nutrients is comprised of different amino acids?.