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

Graphic images can be stored in a variety of formats including ____.
During which months do both the Northern and Southern Hemispheres receive the same amount of energy from the Sun? Check all that apply. - December - June -
I need help on this question
What was a primary reson for the revenue popularity of the ku linux klan?
You are going on a road trip over a distance of 300030003000 kilometers with three friends. The car consumes 666 liters of gas per 100100100 kilometers and gas
The Venus of Willendorf was created out of which media Ivory Clay Stone Terra-cotta
The length of the hypotenuse of a 30-60 -90 triangle is 14 units. what is the length of the short leg
Assume that male and female births are equally likely and that the birth of any child does not affect the probability of the gender of any other children. find
How can a poet use narrative technique to create tension?
Ralphie has a large tropical fish collection. He gives 2/3 of his fish to a local high school. Then he gives 2/5 of the remaining fish to an elementary school.