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

Positive energy balance is important when A. a child is growing. B. you're stressed. C. weight stability is desired. D. weight loss is desired.
the particles that make up a rock are constantly moving. however, a rock does not visibly vibrate. why is this?
26.5 - 9.3 using compensation
What type of fertilization requires a great excess of egg and sperm gametes because most are wasted? a.external fertilization b.internal fertilization c.pollin
y-3=3(x+1) What is the equation in standard form of a parallel line that passes through (0, -3)
write a 3-digit number using digit 2,9,4. Draw a quick Picture to show the value of your number
Alcohol does each of the following EXCEPT a. slow reflexes. c. impair judgment. b. stimulate heart rate. d. disrupt coordination.
In logic, arguments are never described as true. valid. inductive. sound.
The cell theory teaches that _____. the basic unit of life is the organism the basic unit of life is the cell all cells have the same basic structure cells are
what is 5)47 and the remander