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

When you don't consume enough protein, your body will start using your muscles and organs as a source of protein. True
What two processses form a cycle,with the products of one becoming the reactants of the other?
PLEASE HELP!!!! WILL GIVE BRANLIEST!!
| 19 − 20x | − |20 − 19x |− |x − 10|, if x > 100
When it is 5:00 a.m. in Anchorage, it is 11:00 p.m. in Tokyo. How far ahead of Anchorage is Tokyo? a. 6 hours b. 16 hours C. 18 hours d23 hours
What is the difference of 3.14 and the sum of 5.99 and 0.65?
accurately 5 different ways that antiretroviral drugs can prevent virus formation
Pls help will give brainilist
find the meaning of give below atmosphere, hurricane,associated ,unusal,coastal ,renewable​
Consider the topic of age discrimination. Is it ever appropriate to discriminate based on age?