Answer:
Following are the program in python language:
def list_concat(ls): #define function
if(len(ls) == 0): #set if condition
return ""
res = ""
for x in ls: #set for loop
res += x + " "
return res[:len(res)-1] #removing the extra spaces from list
ls = ['limit','break','ready'] #initialize the value in list
print(list_concat(ls)) #call the function
Output:
limit break ready
Explanation:
Here we declared a function "list_concat()" in which we pass an argument "ls" then check if condition that check the length of list .We also Iterating the loop in that function res[:len(res)-1] statement removes the extra space from the list and finally print the list
Answer:
Select title, description , first_name, last_name from film inner join film_actor on film.film_id = film_actor.film_id inner join actor on film_actor.actor_id = actor.actor_id where title LIKE 'zo%';
Explanation:
- The INNER JOIN keyword selects records that have matching values in both tables.
- The WHERE clause is used to filter records.
- The WHERE clause is used to extract only those records that fulfill a specified condition.
Answer:
boolean recalled;
((modelYear>=1995 && modelYear <=1998) || (modelYear>=2004 && modelYear<=2006)) ? recalled =true : recalled =false;
Explanation:
In the first line of the code we declare the variable of type boolean (values can only be true or false) then using the conditional expression operator (ternary operator) in place of an if statement, We state the conditions of the years that will return true and vice versa
Answer:
Port number is used at the transport layer to identify the receiving application
Explanation:
Transport layer is responsible for overall “end-to-end” communication. It provides communication service to the application process which might be running on “different hosts”.
TCP (Transmission Control Protocol) or UDP (User Data Protocol) is the protocol used in the Transport layer. The port number is essential so that the transport layer can carry packets to the right destination pointing to the right application.
A port number usually contains 16 bit integer. Normally this number will send along with the header. Port number plays a major role in Transport layer.