Data Science and Artificial Intelligence
GATE DA topic:computing PYQs
Build your understanding with focused practice from past exam papers.
Questions 161–170 of 195. Imported answers require independent review unless marked reviewed.
Question 31
Open questionDANAT1 markNeeds review
Consider the following two tables named Raider and Team in a relational database maintained by a Kabadi league. The attribute ID in table Team references the primary key of the Raider table, ID.
Raider:
ID | Name | Raids | RaidPoints |
|---|---|---|---|
1 | Arjun | 200 | 250 |
2 | Ankush | 190 | 219 |
3 | Sunil | 150 | 200 |
4 | Reza | 150 | 190 |
5 | Pratam | 175 | 220 |
6 | Gopal | 193 | 215 |
Team:
City | ID | BidPoints |
|---|---|---|
Jaipur | 2 | 200 |
Patna | 3 | 195 |
Hyderabad | 5 | 175 |
Jaipur | 1 | 250 |
Patna | 4 | 200 |
Jaipur | 6 | 200 |
The SQL query described below is executed on this database:
SELECT *
FROM Raider, Team
WHERE Raider.ID=Team.ID AND City="Jaipur" AND RaidPoints > 200;
The number of rows returned by this query is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 32
Open questionDANAT1 markNeeds review
The fundamental operations in a double-ended queue D are:
insertFirst(e) – Insert a new element e at the beginning of D.
insertLast(e) – Insert a new element e at the end of D.
removeFirst() – Remove and return the first element of D.
removeLast() – Remove and return the last element of D.
In an empty double-ended queue, the following operations are performed:
insertFirst(10)
insertLast(32)
a ← removeFirst()
insertLast(28)
insertLast(17)
a ← removeFirst()
a ← removeLast()
The value of a is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 33
Open questionDANAT1 markNeeds review
Let
be the function
.The value of the derivative of
at
where
is _____ (rounded off to two decimal places).Note:
denotes the set of real numbers.Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 34
Open questionDANAT1 markNeeds review
The sample average of 50 data points is 40. The updated sample average after including a new data point taking the value of 142 is _____.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 35
Open questionDANAT1 markNeeds review
Consider the
matrix
.The determinant of
is _____.Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 36
Open questionDAMCQ2 marksNeeds review
A fair six-sided die (with faces numbered 1, 2, 3, 4, 5, 6) is repeatedly thrown independently.
What is the expected number of times the die is thrown until two consecutive throws of even numbers are seen?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 37
Open questionDAMCQ2 marksNeeds review
Let
be a function. Note:
denotes the set of real numbers.
Which ONE of the following choices gives the values of
that make the function
continuous and differentiable?Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 38
Open questionDAMCQ2 marksNeeds review
Consider the following Python code:
def count(child_dict, i):
if i not in child_dict.keys():
return 1
ans = 1
for j in child_dict[i]:
ans += count(child_dict, j)
return ans
child_dict = dict()
child_dict[0] = [1,2]
child_dict[1] = [3,4,5]
child_dict[2] = [6,7,8]
print(count(child_dict,0))
Which ONE of the following is the output of this code?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 39
Open questionDAMCQ2 marksNeeds review
Consider the function
whose pseudocode is given below:computes(X)
S[1] ← 1
for i ← 2 to length(X)
S[i] ← 1
if X[i − 1] ≤ X[i]
S[i] ← S[i] + S[i − 1]
end if
end for
return S
Which ONE of the following values is returned by the function
for
?Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 40
Open questionDAMCQ2 marksNeeds review
Let
denote the maximum number of comparisons made while searching for an entry in a sorted array of size
using binary search.Which ONE of the following options is TRUE?
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer