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

11. What was meant by the "closing' of the Western frontier? the evacuation of many Western towns due to attacks from Native Americans the decision by the Unite
How many Moles of NO can be made from 30.0 g of NH3? 4 NH3 + 5 O2 → 6 H2O + 4 NO
find the equation of a parabola with a vertex of (2,8) and passes through the point (10,-4)?
Find the value of x.
Esi does an experiment where she picks a block out of a bag without looking 50 times, putting it back each time. She picks a green block 32 times. If the bag ha
All of the following are good tips regarding using humor in your speeches, except: a. Before using humor in your speech, try it out with small groups of people.
Why the electric bell will not work if the Electromagnet is replaced with a permanent magnet? Please help! Will give the brainliest !
To neglect the worship of God is: A.reverent B.sometimes alright C.inconsequential D.sinful
Mrs. Smith is getting ready for her son, Max’s birthday party. She found two tanks of helium gas in her basement. She wants to know which tank has the most heli
If m<7 =55°,which of the following statements are true? Select all that apply...