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

how did islam influence europe beginning around the 15th century? a. invasions by the islamic ottoman empire destroyed the byzantine empire. b. muslim merchants
what is the formula of the compound between calcium and sulfur that has the percent composition 55.6% calcium and 44.4% sulfur
what is a major difference between the poetry of emily dickinson and the poetry of walt whitman?
which definition is the best for “semipermeable membrane”?
what will occur if the steepness of an inclined plane is decreased?
when did the human brain achieve its modern size
what kinds of polygons are symmetrical? a. circles b. scalene triangles c. all regular polygons d. none of these
in response to peer review, a scientific journal might choose not to publish a paper submitted by a scientist. which of the following is a reason why a paper mi
which law did the most to open western territory to american settlers
Which statement is correct about a line and a point? A line and a point can be collinear. A point has no location, and a line has many points located on it.