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

Compare and contrast the nonspecific defenses of vertebrate and invertebrate animals
A band Martha likes just released a new album a digital music service selling the song for 9.96. the service also allows a purchase of individual songs off the
Explain in details how the circulatory body system works
Dennis is packing 108 pens ,80 books and96 note pads into boxes. He wants to pack an equal number of pens books and note pads in each box . Find the greatest n
What is a equipment fraction to 10/20
What is the main responsibility of the house ways and means committee?
The pressure at which a substance in its gaseous state can exist in equilibrium with the same substance in its liquid state at a given temperature is
Tapiwa raked 5% more leaves than Adam raked. Together they raked 697 liters of leaves. How many liters of leaves did Adam rake?
Can someone please help me on these questions?
In at least 150 words, compare the effectiveness of the U.S. government in meeting the needs of citizens to that of another form of government?