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

Did frank from american pickers pass away
Does the essay examine similarities and differences? Which trait is associated with the question? A. ideas and content B. organization C. voice D. word choice
What three numbers multiply to get 1,728?
The Fed may respond to a recession by
Describe at least two major points of the Declaration of Independence.
How did Rutherford's experiments demonstrate that Thomson's model of the atom was incorrect? a. They showed that atoms have net positive charges. b. They showe
Given the system of equations: 2x – y = –2 x = 14 + 2y What is the value of the system determinant? What is the value of the y−determinant? What is the value
What device has a cartoonist used to show what happened to American shipping during the embargo of 1807
How will you connect new study material to areas that you’re already familiar with?
Please help with this Spanish hw I'll give thanks