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

I NEED HELP ASAP Examine the following quote: "You must suffer me to go my own dark way. I have brought on myself a punishment and a danger that I cannot name.
I NEED HELP ASAP Examine the following quote: "You must suffer me to go my own dark way. I have brought on myself a punishment and a danger that I cannot name.
Write a brief account of Ernest Rutherford’s personal and professional life in no more then 150 words
This is worth a lot of points please answer quick! Find the value of angle c. Explain/justify your steps. (please explain also)
Which process increases the surface area of foods prior to chemical digestion?
What was the race for territory and influence on the the african continent called?
I need to know all about Newton
h o w d o t h i s p l e a s e h a l p m e h
Use this information to match the noun with the adjective with which it agrees. lux lucis f. light margo, -inis, m. border, edge marmor, -oris, n. marble 1.
Which is the solution to this system of equations?