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 was like like for Ida growing up in the south?
Please someone help me this is for my health class! Identify the four main physical dangers of smoking cigarettes:
Paula walked on the treadmill for 13 minutes. The machine told her she had a total of 897 strides. What was her rate in strides per minute?
Given f(x)=2x+4,g(x)=x+5,h(x)=x^(2)-3; find g(h(-2))
I need help pls I really need help it’s my little sisters homework
Engineers plan to develop a new drill for use on oil rigs. What should the engineers do first in order to develop the new drill
1. Everyone in the class (was, were) to give a report. 2. Either Felicia or Ellen (is, are) planning a hobo party. 3. (Does, Do) either of them know how to swim
What was the difference between the two houses of Parliament?
Read the excerpt from Warriors Don't Cry. Dear Diary, The two days since I first went to Central felt like I was living in some stranger's life. Today I won't t
Hey guys what are your fav. FNAF song? Mine is Survive the Night. It reflects my personality; cute n' friendly until bad things happen to you, then everyone get