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

How do you recognize a water emergency?
Lemon Juice Tums (antacid) Water Put all of the above household items in order from lowest to highest pH. A) Lemon juice, water, Tums B) Water, Tums, Lemo
What is the surface area of a sphere with the given dimension? Express your answer to nearest hundredth. Use 3.14 for pi. Radius = 5cm.
Find the constant of proportionality for the table and write in the form y = kx. A) y = 9x B) y = 10x C) y = 90x D) y = 1 10 x
You have users who need to do some programming projects in the ruby programming language
What characteristics are shared by all alkali metals and alkaline earth metals? no answer provided a. they do not react with water at all. b. they are strong an
in 2001, President George Washington w. bush signed the economic growth and tax relief reconciliation act of 2001. this bill called for large tax cuts just as
What is the molecular geometry about nitrogen in ch3nh2?
Seventy-five percent of the data falls below what number? 30 12 36 27
Where in your stomach is the best place to stab yourself to make it count?