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

please help me i would really appreciate it and make my day :)
Can someone help with this spanish assignment
Find the mean 35 40 12 16 25 10
Christmas music in latin america today is likely be the same music used in the u. s. to entice shoppers at holiday time. a. True b. False
Semiconductors are more effective than metals as converters of solar radiation into electricity because?
Please help me, I'm stuck
A researcher has sequenced a gene that is present in two alleles. She has a mixture of both alleles and clones them into e. Coli using plasmids that contain the
Find the area of the trapezoid 3cm 3cm 4cm 1cm
. If (5, 7) and (-3, 0) lie on the line ax - by = -20. i) Find the value of a & b. [IM] ii) Write the equation of the line in standard form. iii) Find the c
A crystal of potassium permanganate is placed in a beaker of water. The purple colour of potassium permanganate gradually spreads throughout the water by diffus