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

Can some one help me ??? Anyone ?
Can some one help me ??? Anyone ?
Brandon owns nearly 2 times as many CDs ads Ingrid. Brandon owns 56 CDs. Write an equation and use it to estimate the number n of CDs Ingrid owns.
there are 12 small gift bags .Each bag ca
How do you translate "fifty-three plus four times c is as much as 21" in an equation
25% of 88 is the same as what percent of 22? 1) 12 1/2% 2)40% 3) 50% 4) 100%
is 7 over 9 , 5 over 12, and 5 over 8 terminating or repeating decimals? and what are they in decimals? please explain..thx :)
If every positive number has two square roots and you can find the length of the side if a square window by finding a square root of the area, why is there only
How do you compare distances in words? ex: jack travels 2.45 miles to school. Wanda travels 2.31 miles to school. Compare the distance using words.
91,007,500 in scientific notation with positive powers of 10