Answer:
Explanation:
The following code is written in Python. It is a function called remove_last_letter that does just that, removes the last letter of the last element in the array. and saves it back into the array. The code is written in three statements but only the middle statement is the actual code, the other two are the function creation statement and the last is the return statement.
def remove_last_letter(names):
names[-1] = names[-1][0:-1]
return names
Answer:
Round trip times required = log2N
Explanation:
The round-trip times required before TCP can send N segments using a slow start is log2N. we can arrive at this by looking at the mode of operation of TCP which is at the 1st time of using a TCP it starts the congestion window as 1 then it sends an initial segment. When the acknowledgement of the initial segment arrives, TCP increases the congestion window to 2 and then sends 2 segments, When the 2 acknowledgements of the segments sent out arrives, they each increase the congestion window by one, thereby increasing the congestion window to 4 . therefore it takes log2N round trips before TCP can send N segments
Answer:
int main()
{
int a,b,max,min;
cout<<"Enter 2 numbers\n";
cin>>a>>b; //asking numbers from user
max= a>b ? a : b; //using conditional operator to find larger
min= a>b ? b : a; //using conditional operator to find smaller
cout<<"\nLarger is "<<max;
cout<<"\nSmaller is "<<min;
return 0;
}
OUTPUT :
Enter 2 numbers
56
34
Larger is 56
Smaller is 34
Explanation:
- In the above program, first user is asked to enter 2 numbers which needs to be compared.
- Conditional operator - This operator contains syntax - (condition ? true : false) . This is a ternary operator in which first operand checks the condition and if its true second operand is returned otherwise third is returned.
- Then conditional operator is used twice first to find larger number and then smaller.
- At last both numbers are printed.
Databases can store information about people, products, orders, or anything else.
There are usually videos on YouTube