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

Does anyone know the answers to any of those if you know 1 or 2 or 3 of them pls help me worth 13 points
4 yd greater than 13ft
indicate the equation of the given line in standard form, the line containing the hypotenuse of right triangle ABC where A(-5,5), B(1,1) C(3,4) are the vertices
what can i do to solve for the variable y-4=0
what is the y intercept of the plane whose equation is 4x + 5y - z equals 20
In what direction does an applied force move an object? A.independant to the force B.in the same direction as the force C.perpendicular to the force D.in the op
Which part of the u.s. economy had the biggest boost after world war i?
There are white, blue, and red boats in a marina. Two-thirds of the boats in the marina are white, five-eighths of the remaining boats are blue, and the rest ar
Which of the following is a controllable risk factor of infectious diseases? A. drug abuse B. pollution C. air D. heredity Please select the best answer from t
True or False A distance-versus-time graph will never show a horizontal line if false write it the write way