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

During World War II, Germany tried to capture the Russian city of Stalingrad because it was the site of atrocities committed by Stalin. it had a strategic locat
describe how you think the tiny dust particles acquired a charge.
Was the Cold War inevitable?
A number is increased by 25% and the resulting number is then decreased by 20%. The final number is what percent of the original number?
In the roman republic can everyone participate in government to some degree
How do I know that a fraction is equivalent??
Monetary policy is BEST described as?
Am I correct????????????????
According to Pi, why does the hyena not eat him or the zebra immediately?
En el ________, sere la duena de una tienda. A. militar B. futuro C. graduacion D. salario