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

how could the British and the colonists have avoided the conflicts led to the American Revolution​
A common function of a comma is: Select one: 1)to show a minor pause or set aside extra information in a sentence 2)to indicate an omission of a word or phrase
How did Voltaire’s ideas influence the French Revolution? A He supported freedom within the rule of law. B He saw science as the best way to gain knowledge. C H
Identify the italicized clause. The Bible that is on the desk is mine. adjective adverb noun
When trying to compare two countries economies that have the same GDP but one has 10 million more people living in it, which type of GDP would you use to measur
What do you think Prince Henry is doing in this painting? Where do you think this painting takes place?
1. An area of high flat land is called a A. hill B. plateau C. plains D. mesa
there is two errors in this sentence: el estudiantes estamos en la sales de clases
How was Franklin Roosevelt different from Herbert Hoover when it came to their relationship with the American people?
PLEASE HELP ME PLEASE DO NOT USE ME FOR THE POINTS I REALLY NEED HELP Where is the rhyme in the kids book ¨Be glad you have a nose on your face¨