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 parts of the economy grew during the 1990s and which declined?
What land or water feature separates the subcontinent of South Asia from the other parts of Asia? A. Bay of Bengal B. Hindu Kush and Himalayas C. Indus River
What is a historical non example of individual rights?
HELP ASAP!! Which of the following best explains the U.S. Supreme Court decision in Bush v. Gore? It decided that Florida’s first recount should resume in all
Different types of imagery in literature
Sara goes on a slingshot ride in an amusement park. She is strapped into a spherical ball that has a radius 3*10^2 of centimeters. What is the volume of air in
A ____________ is the unit of measurement of a lens's refractive power.
How did the Portuguese arrive in Brazil?
find the area of the parallelogram that has a base of 4 m and a height of 5.5a. 9.5 m2b. 22 m2c. 11 m2d. 16 m2
In which disease does a drinker’s liver develop scar tissue?