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

The British takeover of Egypt was an example of British expansionism. industrialization. colonization. economic imperialism.
In order to receive a structural adjustment loan, a nation might have to do all of the following except __________
Researching known information is an important process of developing a research question. Please select the best answer from the choices provided T F
_______________ means poor, scantly, and inadequate. a. Clientele b. Meager c. Dowry d. Matchmaker
please help me please please
Write an equivalent expression for 8+7y+2x+4y+4
the energy thats given to the body by food is
Which seed plants are not gymnosperms ? a. cycads. b. ginkgo. c. flowering plants. d. conifers
Men naturally have a _____. A.lower metabolic rate than women B.higher metabolic rate than women C.similar metabolic rate to women D.stable metabolic rate compa
Which of the following is NOT one of the three basic types of crimes? A. felonies B. infractions C. high treason D. misdemeanors