Answer:
The solution code is written in Python 3:
- def modifyList(listNumber):
- posCount = 0
- negCount = 0
-
- for x in listNumber:
- if x > 0:
- posCount += 1
- else:
- negCount += 1
-
- if(posCount == len(listNumber)):
- listNumber.append(max(listNumber))
-
- if(negCount == len(listNumber)):
- listNumber.append(min(listNumber))
-
- print(listNumber)
-
- modifyList([-1,-99,-81])
- modifyList([1,99,8])
- modifyList([-1,99,-81])
Explanation:
The key step to solve this problem is to define two variables, posCount and negCount, to track the number of positive value and negative value from the input list (Line 2 - 3).
To track the posCount and negCount, we can traverse through the for-loop and create if else statement to check if the current number x is bigger than 0 then increment posCount by 1 otherwise increment negCount (Line 5- 9).
If all number in the list are positive, the posCount should be equal to the length of the input list and the same rule is applied to negCount. If one of them happens, the listNumber will append either the maximum number (Line 11 -12) or append the minimum number (Line 14-15).
If both posCount and negCount are not equal to the list length, the block of code Line 11 -15 will be skipped.
At last we can print the listNumber (Line 17).
If we test our function using the three sets of input list, we shall get the following results:
[-1, -99, -81, -99]
[1, 99, 8, 99]
[-1, 99, -81]
<span>SSL is used to process certificates and private/public key information. </span>SSL stands for Secure Sockets Layer. It is cryptographic protocols <span> that creates a trusted environment and </span>provides communications security over a computer network. The SSL protocol is used for establishing encrypted links between a web server and a browser.
Answer:
- ADSL.
- Ethernet Home Networks.
- Fiber Optics.
- Cable Television.
Explanation:
In Computer, Guided media also known as bounded media involves the use of cable such as fibre-optic cables, coaxial cable to transmit data signals from one system device to another.
Examples of systems using guided media are;
- ADSL.
- Ethernet Home Networks.
- Fiber Optics.
- Cable Television.
A cryptocurrency is a digital asset designed to work as a medium of exchange that uses strong cryptography to secure financial transactions, control the creation of additional units, and verify the transfer of assets.
Answer:
An online tool or software.
Explanation:
Video conversion can be done using an online tool and software. If you choose to convert your videos by using an online tool, open any online tool and paste the link of the video or upload a video file from your computer, select the format you want and then click convert. Conversion takes a few seconds, and once the conversion is done, you can download the audio file. And if you choose to convert your videos by using the software, you have to download software, install it in your personal computer, and use it for conversion. In this process of transformation, you have to upload a video file from your computer. And if you do not need the output file format, some software can choose the setup automatically.