What will be the output of the following Python code snippet?
def insert(items): if items in total: total[items] += 1 else: total[items] = 1 insert('Apple') insert('Ball') insert('Apple')
Assume that source S and destination D are connected through two intermediate routers labeled R. Determine how many times each packet has to visit the network layer and the data link layer during a transmission from S to D.
Consider the relational schema given below, where eId of the relation dependent is a foreign key referring to empId of the relation employee. Assume that every employee has at least one associated dependent in the dependent relation.
employee (empId, empName, empAge)
dependent (depId, eId, depName, depAge)
Consider the following relational algebra query
π empId (employee) — πempId (employee (empId = eID) ^ (emp ≤ Age depAge) dependent)
The above query evaluates to the set of empIds of employees whose age is greater than that of
What will be the output of the following Python code?
>>>list1 = [1, 3]
>>>list2 = list1
>>>list1 = 4
x = "abcdef" i = "a" while i in x: x = x[1:] print(i, end = " ")
Consider a set U of 23 different compounds in a Chemistry lab.
There is a subset S of U of 9 compounds, each of which reacts with exactly 3 compounds of U. Consider the following statements:
I. Each compound in U \ S reacts with an odd number of compounds. II. At least one compound in U \ S reacts with an odd number of compounds.
III. Each compound in U \ S reacts with an even number of compounds.
Which one of the above statements is ALWAYS TRUE?
>>> import collections >>> a=collections.namedtuple('a',['i','j']) >>> obj=a(i=4,j=7) >>> obj
What will be the output of the following Python statement?
What is the output of this C code?
static int x;
if (x++ < 2)
x=[,] print(" ".join(list(map(str,x))))
Which among the following list of operators has the highest precedence?
+, -, **, %, /, <<, >>, |
If and Consider I. is a regular language II. Which one of the following is CORRECT?