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 is greater, 6.76 or 6.759
20. Simplify: 4×^3√3x+5 ^3√10x
If I have added new headings in my document and wanted to update my table of contents, what would I need to do to ensure the new headings are included in the ta
Why does increasing concentration speeds up chemical reaction?
who invented the cellphone
how to solve the problem
"The person of the king is sacred, and to attack him in any way is an attack on God itself. Kings represent the Divine Majesty and have been appointed to Him t
William Wordsworth is considered one of the central writers of the Romantic period because his poems
Consider the quadratic function f(y) = 8y2 – 7y + 6. What is the constant of the function?
A warehouse received 250 orders in april, and 300 orders in may. what was the percentage of increase in orders from april to may?