Answer: A. Voice over Internet Protocol
B. It reduces the delay for all objects requested by a user.
Explanation:
Voice over Internet Protocol is used to transfer voice communication and multimedia over the internet. It converts voice into a digital signal, transfers it over the internet and then reconverts it to voice when it reaches its destination.
Web Caching stores the data from a web page for reuse at a later time, this helps to reduce the tasks the server carries out and reduces delay. Because some objects are cached, more resources can be focused on objects that are not thereby reducing delay for all objects requested by a user.
Answer:
#include <iostream>
using namespace std;
int main() {
int a[4][5];//declaring a matrix of 4 rows and 5 columns.
for(int i=0;i<4;i++)
{
for(int j=0;j<5;j++)
{
if(i==3)//initializing last row as 0.
{
a[i][j]=0;
}
else//initializing last row as 1.
{
a[i][j]=1;
}
}
}
for(int i=0;i<4;i++)
{
for(int j=0;j<5;j++)
cout<<a[i][j]<<" ";//printing the matrix.
cout<<endl;
}
return 0;
}
Output:-
1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
0 0 0 0 0
Explanation:
I have created a matrix of size 4 rows and 5 columns.I have used for loops to fill the array.To fill the last row with 0 i have used if statement.else we are filling it with 1.
Answer:
Python Code:-
#creating a list
current_members = [4, 6, 9]
#defining the variable
#assigning the value
member_id = 9
#defining variable count
count = 0
#defining the variable and setting initial value to true
is_a_member = False
#for loop is used to iterate over the list
for x in current_members:
#if statement will check whether the element is found
if x == member_id:
#set the value to true if the value is matched
is_a_member = True
#set the value to 1
count = 1
#if count == 0
#set the value of is_a_member variable to false
if count == 0:
is_a_member = False
#print the current value stored in is_a_member variable
print(is_a_member)
Explanation:
In the above python program, a list is created that is "current_members" and some values are inserted. In the next line, a three-variable is defined that are member_id, count, and is_a_member.
- In both variable member_id, count assigns some value. and in is_a_member variable assign a False value.
- Using a for loop to iterate over the list.
- Inside the loop, If the statement will check whether the element is found. Then set the value of is_a_member variable to True and count to 1.
- Another if the statement is used which checks the value of the count variable. If the value of count is 0 then set the value of is_a_member to False.
- print() function is used to display the current value of is_a_member variable.
di = {"student":"10/30/1984", "student2":"11/16/2020"}
name = input("What is your name? ")
if name in di:
print(di[name])
else:
print("Your name is not in the dictionary.")
You can change the values inside the dictionary. I hope this helps!