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 is the formula of Sodium Sulfide? A) Na3S₂ B) NaS₂ C) Na₂S D) Nas
Identify explicit formula for the sequence 3, 6, 9, 12, 15, ...
Determine which set of side measurements could be used to form a right triangle. 3, 11, 20 5, 9, 17 6, 7, 8 6, 8, 10
It costs $2.50 to rent bowling shoes. Each game costs $2.25. You have $9.25. Write and solve an equation to find out how many games you can bowl.
Find the Slope Using the slope equation
Why does my screen keep showing R/34 pictures of boots the monkey? I’m graduated so my points are up for grabs cause I’ll never use them. I have to at least as
f+1<5 please tyyyyyyyyyyyyyyyy
What happens to earnings in a cooperative?
What happens to earnings in a cooperative?
2nd exercise of a 5-part course. Giving 100p for each. Total of 500p. (Everything must have a procedure) 2. Convert the next rectangular functions into polar fu