1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
BlackZzzverrR [31]
3 years ago
13

write a python function that takes the largest and smallest numbers in a list, and swap them (without using min() or max() )

Computers and Technology
1 answer:
Akimi4 [234]3 years ago
8 0

Answer:

def SwapMinMax ( myList ):

   myList.sort()

   myList[0], myList[len(myList)-1] = myList[len(myList)-1], myList[0]

   return myList

   

Explanation:

By sorting the list, you ensure the smallest element will be in the initial position in the list and the largest element will be in the final position of the list.

Using the len method on the list, we can get the length of the list, and we need to subtract 1 to get the maximum element index of the list.  Then we simply swap index 0 and the maximum index of the list.

Finally, we return the new sorted list that has swapped the positions of the lowest and highest element values.

Cheers.

You might be interested in
Order the steps to use a logical argument as a rule type.
muminat

Answer:

Click home tab, click conditional formatting, click new rule, use formula to determine

6 0
3 years ago
Read 2 more answers
A(n) _____ is a flexible tool used to analyze data using reports that do not have a predetermined format.
Mandarinka [93]

Answer:

decision support system

Explanation:

4 0
3 years ago
A software company is weighing whether to release a new version of its software as scheduled. The company can go ahead and relea
Kisachek [45]

Answer:

B) vaporware.

Explanation:

Vaporware is a software or hardware product that is not yet released in the market but has already advertised. This can be the product is probably still under development or it is still in its idea form and not developed at all. Vaporware is a term used in the computer products industry. Products that were announced but missed the released date by a big amount of time can also be called vaporware.

8 0
3 years ago
Which Internet connection can have speeds around 1 Gbps?<br> Cable<br> DSL<br> Fiber<br> Satellite
Alexus [3.1K]
<h2>Answer:</h2>

<u>Fiber</u> Internet connection has speeds around 1 Gbps.

<h2></h2><h2>Explanation:</h2>

Fiber Internet connection is the modern way of transmitting and receiving data. As obvious from the name Optical Fiber consists of thin fibers that are extremely thin (as a human hair). They transmit data with the beam of light that make this transmission speedy as well as reliable. Therefore they provide  the download speed ranging from 25 Mbps to 1 Gbps.

Fiber Internet connection is considered best for the small businesses as it provides high bandwidth for transmission.  The best part of this connection is that it is made of glass and plastic that  do not conduct heat or electricity that means the fiber is safe from the damages as well.

<h3>I hope it will help you! </h3>
5 0
4 years ago
____________ describes all the communication channels that allow community-based input, interaction, content-sharing and collabo
vladimir1956 [14]

Answer:

Social media.

Explanation:

The social media is an online platform that provides its users with the web application interface for easy communication. Since it is online, the user must subscribe to a ISP service, create an account on the social media website, and optionally download it's application on the device for easy access.

User accounts are secured with a username and password. The user on the site can share graphic, video, audio and text content, interact with friends etc.

7 0
4 years ago
Other questions:
  • Redo Programming Exercise 16 of Chapter 4 so that all the named constants are defined in a namespace royaltyRates. PLEASE DONT F
    14·1 answer
  • Which of the following qualifies as a teamwork skill? A. Free associating B. Multitasking C. Listening D. Problem solving
    6·1 answer
  • A four-year old laptop will not boot and presents error messages on screen. You have verified with the laptop technical support
    11·1 answer
  • An isotope of an element has:
    11·2 answers
  • Consider the following declaration.int[] beta = new int[3];int j;Which of the following input statements correctly input values
    11·1 answer
  • Which of the following is a scam in which a perpetrator sends an official looking e-mail that attempts to obtain a user’s person
    7·2 answers
  • How to change the size of my document in cs6?
    13·1 answer
  • What are the functions of the windows button, Task View and Search Box? give me short answer
    15·1 answer
  • What is the importance of using Onedrive in Windows 10 and how knowledge of it will have an impact in today's workplace?
    7·2 answers
  • Mention any
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!