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

Use the drawing tools to form the correct answer on the number line. Graph the solution set to this inequality. -2z+9≤ 5z - 12 Drawing Tools Select Point Open P
A=16,c=14m,b=19m, find the angle C°,A,B
Xjjxjxjotdriskrsktstkstkstksglwglwtlwltwtldlts
Three forces, F₁, F2 and w, act on point O as shown in the diagram below. 3.1 BO N 3,3 60 0 Define the term resultant of forces. AF₂ 58 N (2) .​
global warming leads to rise in the water level . Do you agree ? Prove your statement
Aled feeds his pet cat of a can of cat food each day. How many cans of cat food should Aled buy each week
HELPPPPPPPPPP PLEASEEEEEEEE!!!!
If anybody could help me with this I would appreciate it so much with an explanation on how to do it aswell. ( sorry for the HORRIBLE lighting )
2y+5x=23 solve for y
Cookout You are planning a cookout. You figure that you will need at least 5 packages of hot dogs and hamburgers. A package of hot dogs costs $1.90 and a packag