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

In triunghiul abc dreptunghic in a se stie bc=4rad13 si ab/ac =2/3 determinati lungimile catetelor
As the weight held by a spring increases, the length of the spring increases, proportionally. Suppose a 2-lb weight stretches a spring to 15 in., and a 12-lb we
Use estimation to check the answer to this story problem. Mrs. Victorino needed 765 yards of yarn for each sweater she was knitting. She planned to make 11 swe
I need help with this
18 % of 90 is what number
Who was the first american in space?
What are some advantages to a traditional economic system?what are some disadvantages?
Which of the following was not an influence on the people in Latin America who sought independence in the 19th century?
If a person's eardrum perceives a sound with a high pitch what can be predicted about the wavelength of the sound wave? The wavelength is double the pitch. The
The intensity of an activity refers to the A. length of time it takes for an exercise or group of exercises to be complete. B. number of times an exercis