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

Which one is greater (10^5)(10^2) or 10^5+10^3? Why is it greater?
there are 275 people in the movie theater. the same number of people are seated in each of the 5 different sections of theater. how many people are seated in ea
Which is a factor of 2x2y4 − 10x2y + 14y3 − 70?
If 75 pairs of jeans are sold, what is the company’s profit?
compare plant and animals cells. what structures or processes due plant cells possess or perform that animal cells do not? photosynthesis cellular respiration c
If you were to examine the system of government in the United States and relate it to an athletic event, then the Constitution would act like A. the rulebook.
what is the the decimal number 95.3 in a fraction
what can parents do to help a special needs child?
best time to study math is morning or night? can y'all answer me bout what do you think?
88.83 is what percent of 21?