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

What is the value of the expression below? (0−3)−8(12+4)
Toya is training for a triathlon and wants to bike and run on the same day. She has less than 3 hours to spend on her workouts. What inequality represents the t
Which of the following is true of a memoir? A reader must be able to finish the memoir quickly. All the events of the story must be true to life. A rea
Plz help I don’t get it
In the diagram, LaTeX: \Delta ABC\cong\Delta DFE Δ A B C ≅ Δ D F E . Find the values of x and y.
what is the slope of -3/2 (3,1)
What changes occurred as a result of the New Deal? Check all that apply. Obanking regulations Ofinancial equality Oimproved infrastructure Opoverty relief O hea
Which of the following job tities is held by a person working at a global food distribution ?
How did the boxer rebellion affect china
What are the living parts that make up an organ system?​