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

a restaurante bill comes to $28.35. Find the total cost if the tax is 6.25% and a 20% tip is left on the amount before tax.
What is the arclength of PQ
what is employment law?​
An animal shelter spends $2.00 per day to care for each cat and $6.50 per day to care for each dog. Amelia noticed that the shelter spent $30.00 caring for cats
Find the area please
(5x+1)(x-2)=0 A. 1/4,3 B. -1/4,2 C. 1/5,2 D. -1/5,2
HELP ASAP PLEASE!!! Which of the following is the least important property of a mineral? A. color B. luster C. streak D. hardness
Cup N Cone Inc., a graphic design firm, has offices in New York, Texas, California, New Mexico, and New Jersey. Each of these offices is headed by a president w
Miranda enlarged a picture twice as shown below, each time using a scale factor of 3. A rectangle with length 6 inches and width 4 inches is enlarged twice. Whi
4.) Explain how Lincoln's word choice helps create his points of emphasis. Share how this makes his speech powerful and effective.