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 the model of an atom has changed over time because?
Symptoms of menopause may be treated with A. LSH. B. ARB. C. HRT. D. ACE.
I need help with my homework
As the result of experimental work, a student finds the density of a liquid to be .137 g/ml. the known density of the liquid is .1478 g/ml. find the student's e
When a 10 ml graduated cylinder is filled to the 10 ml mark, the mass of the water was measured to be 9.955 g. if the density of water is taken to be 0.9975 g/m
Which of the following were advantages of the caste system
What was the House of Burgesses?
A carpenter used 9 1/2 ft of cedar for every 7 2/3 ft of redwood for a construction project. If the carpenter uses 4 3/4 ft of cedar, how much redwood does he n
ian mailed a package that weighed 5.63 pounds. what is the first step in rounding this numbers to the nearest tent ? what is the next step ? what is 5.63 rounde
When you remember how wonderful your mother was but forget how often she made you feel inadequate, then you are exhibiting the perception concept called?