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

Muscles that are often weak in people who are sedentary or overweight are known as ________ muscles.
How much interest will be paid in 1 year for a loan of $3600 at 8 1/2% simple interest?
the rain has began. change this sentence into simple present tense quick
What is thirty multiplied by two hundred?
(Who/Whom) did you ask to help us?
in triangle ABC, m<A = 17 and m<B = 100. what is the measure of <C
What are the characteristics of a mixed economy?
Which statement about Ceres is false?
What is the ratio of feet to inches iin a foot?
In The Tempest, Prospero attempts to restore himself after losing his dukedom at the hands of his brother. Toward this end, he enslaves Ariel and Caliban. Which