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

Hi, May I have Chem help please? Please Keep the answer as simple as possible because it is a for a bcr. Describe the three subatomic particles (protons, neutr
Rationalize the denominator 11/Square root of 5 - square root of 6
What are two ways main items are typically served in a cold food presentation or a buffet
1) Which is a characteristic of a metal? A) It looks dull. B) It feels brittle. C) It is a good insulator. D) It is a good conductor of electricity. 2)
List two strategies for organizing reports
A scientist noticed that a dark-colored peppered moth is more visible on a light-colored background than a light-colored peppered moth. He wonders, “Does this
Luna had $50 when she got to the carnival.After riding 12 rides, she had $26 left. What was the price of each ride?which equation could be used to represent thi
What is the value of x?
What effects did Marco Polo have on the people of Asia and Europe?
You have been asked to deliver the commencement address at your high school graduation. Which of the following should NOT be contained in the speech? A) Thanks