Answer:
please can you make this question make sence so i can at least try to help by answering this question for you
Answer:
- def process(lst1, lst2):
- newList = []
- for i in range(0, len(lst1)):
- sum = lst1[i] + lst2[i]
- newList.append(sum)
- return newList
-
- list1 = [1, 3, 5, 7, 9]
- list2 = [2, 4, 6, 8, 10]
- print(process(list1, list2))
Explanation:
Firstly, create a function process that takes two input lists (Line 1). In the function, create a new list (Line 2). Use a for loop to traverse through the elements of the two lists and total up the corresponding elements and add the sum to the new list (Line 3 - 5). At last, return the new list (Line 6).
In the main program, create two sample list and use them as arguments to test the function process (Line 8 - 9). We shall get the output [3, 7, 11, 15, 19].
Answer:
Component(CompID, CompName, Description) PK=CompID
Product(ProdID, ProdName, QtyOnHand) PK=ProdID
Supplier(SuppID, SuppName) PK = SuppID
CompSupp(CompID, SuppID) PK = CompID, SuppID
Build(CompID, ProdID, QtyOfComp) PK= CompID, ProdID
Explanation:
details of the answer is attached
Answer:
Following are the program in the Python Programming Language.
# define function.
def return_second_word(sentence):
#remove all the spaces from the sentence
sentence=' '.join(sentence.split())
#the list is split from spaces
my_list = sentence.split(" ")
#return the list
return my_list[1]
#define main function
def main():
#get input from the user
se = input("Enter the sentence: ")
#print and call the function
print(return_second_word(se))
#condition to execute the main function
if __name__ == "__main__":
#call main function
main()
<u>Output:</u>
Enter the sentence: I love python
love
Explanation:
Here, we define the function i.e., "return_second_word()" and pass an argument "sentence", inside the function.
- Remove all the spaces from the variable "sentence" and again store in the variable "sentence".
- Set the variable "my_list" that store the split value of the variable "sentence".
- Return the list and close the function.
Finally, we define the main function and inside the main function.
- Get input from the user in the variable "se"
- And pass the variable "se" in the argument list during the calling of the function "return_second_word()".
- Then, print and call the function "return_second_word()".
- Set the if statement to call the main function then, call the main function.
Answer:
TCP/IP, commonly known as an internet protocol.
Explanation: