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

ways to reduce coal mining damages​
Find the general solution of DE 4y "+ y '= 0
PLEASE HELP!! The circumference of a circle is 3.5mm. Find the length of the diameter. Give your answer rounded to 3 SF. SF means significant figure.
Branliest to correct answer no guessing please
Karl earned scores of 58, 88, 80, and 70 on his first 4 Chemistry tests. What is the minimum score he needs to earn on his fifth test to ensure that his average
PLS HELP MEEEEEE Select the correct answer. Suppose you're creating a multimedia presentation. Which step in the process of preparing a presentation gives you a
The central angle of arc ST is 70 degrees. What is the measure of an inscribed angle whose endpoints are points S and T?
Introduction to Forces Warm-Up Active How do forces affect the motion of an object?
Complete each statement in the steps to solve x2 – 6x – 7 = 0 using the process of completing the square.
The chemical equationP4O10+6H2O → 4H3PO4 P 4 O 10 + 6 H 2 O → 4 H 3 P O 4 can be interpreted correctly as