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 motorcyclist covers 150m in 10 seconds. The speed is: Select one: a. 1.5m/s b. None c. 15m/s d. 1500m/s
What is the perimeter of the trapezoid if x = 4 and y = -2? Round to the nearest whole number
in a market economy, decision about which goods are produced are based on
What's the definition of a landscape
Describe types of hardware used for output​
Explain mood in poems
(30 points) please help! Point B is between A and C. AB = 2x + 1 and BC = 3x. If the measure of AC is 41, what is the value of x?
1. "Two out of three high school students fail to get enough sleep." Is this a claim, reasoning, or evidence? Explain.
American Indians were seen as “uncivilized,” so the Spanish tried to ____ them.
HELP!!!!!!!!!!!!!!!!!!!!! What is the product of –3 and 5? -15 -8 8 15