Answer:
The solution code is written in Python.
- def mult2_diff(lst):
- num_list = []
-
- for x in lst:
- num_list.append(x * 2)
-
- diff = num_list[0]
- for i in range(1, len(num_list)):
- diff = diff - num_list[i]
-
- print(diff)
Explanation:
Firstly, based on the requirement stated in the question, define a function <em>mult2_diff() </em>that takes one argument, <em>lst</em>, which is a list of numbers (Line 1).
This function is expected to multiply each number in the list by two and then followed with computing the difference. To do so, let's try to attempt the first function task, multiplying numbers. Create a new list, num_list, to hold the multiplied numbers (Line 2). Use a for loop to traverse through each number in the input list, <em>lst</em>, and multiply each of them by two and add it to the <em>num_list </em>(Line 4-5).
To attempt the second function task, create another variable, <em>diff</em>, to hold the value of calculated difference between the numbers in the <em>num_list</em>. Initialize <em>diff </em>with the first number in the <em>num_list</em>. Use a another for-loop to traverse through each number in the num_list starting with second index, <em>1</em>, and calculate the difference between the <em>diff </em>and the current number extracted from the <em>num_list </em>through indexing.
At last print the output of <em>diff</em> (Line 11).
Answer:
When Patricia checks her email use:
POP3
TCP
IP
When Patricia brows a website and log in to post a comment use:
HTTP
TCP
IP
LDAP
Explanation:
Email protocol
Patricia starts to check her email, the email application uses the protocol POP3.
The protocol TCP makes a connection with the server and transport the data.
Patricia receives her emails with the protocol IP on her computer.
Website protocol
Patricia started to surf and the protocol HTTP makes a connection with the internet.
The protocol TCP makes a connection with the server and transport the data.
With the protocol IP, she receives the website data.
With the protocol LDAP, Patricia makes a login to post the comment.
have self-control and if you have a problem dont be afraid to speak your mind, show other people you mean buisness, but be polite to aviod starting more problems
Use for loop and question inside it