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

Yo investigué unos sitios por internet. Question options: Yo las investigué por internet. Yo les investigué por internet. . Yo los investigué por i
Is there an N−Cl bond in solid ammonium chloride?
Parallelogram ABCD is dilated to form parallelogram EFGH. Side AB is proportional to side EF. What corresponding side is proportional to segment AD? Type the an
Based on Psalm 23, discuss some of the blessings for people who follow the Lord.
Aggressive behavior is most likely to be ________ by injections of testosterone and ________ by consumption of alcohol.
what is the net force of 625 N and 705 N
Solve the following equation. Then place the correct number in the box provided. 2( z + 1 ) - 4(z - 4) ≤ 2(z + 5)
What is 19 help me plz
What was one of harry truman's greatest accomplishments?
"jason, a recovering heavy drinker, has been trained to identify the situations that might cause him to drink and to be aware of when he should stop drinking. t