What is the difference between default parameters and positional parameters in Python? Also give an example of a function header which uses both.
Which network device serves as the entry and exit point of a network, as all data coming in or going out of a network must first pass through it in order to use routing paths?
Assertion (A): The PRIMARY KEY constraint in SQL ensures that each value in the column(s) is unique and cannot be NULL.
Reason (R): Candidate keys are not eligible to become a primary key.
Expand the term XML.
What will be the output of the query?
SELECT MACHINE_ID, MACHINE_NAME FROM INVENTORY WHERE QUANTITY <= 100;
A table has two candidate keys, one of which is chosen as the primary key. How many alternate keys does this table have?
Which of the following SQL command can change the degree of the existing relation?
A relation in MySQL database consists of 2 tuples and 3 attributes. If 2 attributes are deleted and 4 tuples are added, what will be the cardinality of the relation?
Which aggregate function in SQL returns the smallest value from a column in a table?
With respect to computer networks, which of the following is the correct expanded form of RJ 45?
If L is a list with 6 elements, then which of the following statements will raise an exception?
What will be the output of the following code?
def f1(a,b=1): print(a+b,end='-') c=f1(1,2) print(c,sep='*')
Consider the statement given below:
f1 = open("pqr.dat","________")
Which of the following is the correct file mode to open the file in read only mode?
What will be the output of the following code snippet?
t = tuple('tuple') t2 = t[2], t += t2 print(t)
Which of the following statements is true about dictionaries in Python?
State whether the following statement is True or False:
In Python, Logical errors can be handled using try…except…finally statement.
What will be the output of the following statement?
print("PythonProgram"[-1:2:-2])
Which of the following expressions in Python evaluates to True?
What is the output of the following code snippet?
s='War and Peace by Leo Tolstoy' print(s.partition("by"))
Identify the output of the following code snippet:
s = "the Truth" print(s.capitalize())
State True or False:
In Python, data type of 74 is same as the data type of 74.0.