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

Ummm help? From start to finish
given that m=8-5/r1.make r the subject of the relation 2.find the value of r when s=7m=2 and 3=3​
direction match the word one column a with its meaning in column b writer answer on your activity notebook A. 1.Sanitation.
help There are 4 housekeepers working on each floor. One room only requires one housekeeper. If the housekeepers try distributing the work equally, how many ho
A ladder is leaning against a building. The distance from the bottom of the ladder to the building is 20 ft shorter than the length of the ladder. How high up t
A bargain bin contains classical and rock CDs. There are 60 CDs in the bin. Choosing a rock CD and not choosing a rock CD have the same number of favorable outc
Please help, I need to determine the slope and y-intercept for each group. I need to write an equation for the graph in slope-intercept form.
james puts 5,000 in a savings account earning simple interest at 5.2% annually. how much interest will he earn after 5 years? how much money will he have after
how can you develop quality movement?​
Solve the simultaneous equations by substitution 2x+7y=5 x+y=5