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

4/y+3 + 5/y-6 = 9/y+4 . solve the equation
Select the answer that is the best example of a central idea for the following stanza The waves beside them danced; but they Out-did the sparkling waves in gl
A wheelchair ramp rises 2.25 feet for every 25feet of horizontal distance it covers what is the slope of the ramp
The female reproductive parts of a flower are called a. petals. b. stamens. c. sepals. d. carpels.
which sound device is used in the first and third lines of birches by robert frost
What are the ethical implications of online social media after someone has died? What ethical concerns might exist?
Which one of these foods must be cooked to at least 165 f? a. vegetables b. chicken c. hamburger d. noodles
Section B: Structured Questions The diagram shows a simple spinal reflex arc. There are three errors in the drawing. (a) Explain what the three errors in the d
1. This question is based on the following passage. Both Seagulls and wild geese are large birds. They're also similar in that both kinds of birds can fly o
Probability: For these problems, consider a standard American deck of playing cards—52 cards, 4 suits in the deck, 13 cards in each suit. Imagine also that the