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 127,034 rounded to the nearest ten thousand
there are 27 campers. this is nine times as many as the number of counselors how many counselors are there
National governments have more power than any other human institution in the world. Why do you think this is the case?
how to order 2.8, -2 3/4, 3 1/8, -2.2 least to greatest
How to tell if a fraction is proportional
Which of the following were changes America experienced during the second half of the nineteenth century? More then one answer a war with Great Britain major t
What part of the country is wet and has mild winters and hot summers? A. Northeast B. Southeast C. Southwest D. Midwest
What are the most important questions in life? Why?
A video last 6.44 minutes. About how long does the videonlast, round to the nearest minute?
The three traits an entrepreneur must possess to be successful are _____. a. motivation, humility, and decision making b. conflict management, motivation, and