Data Science and Artificial Intelligence
GATE DA year:2025 PYQs
Build your understanding with focused practice from past exam papers.
Questions 61–65 of 65. Imported answers require independent review unless marked reviewed.
Question 61
Open questiondaNAT2 marksNeeds review
A bag contains 5 white balls and 10 black balls. In a random experiment,
balls are drawn from the bag one at a time with replacement. Let
denote the total number of black balls drawn in the experiment.The expectation of
denoted by
______
(Round off to one decimal place)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 62
Open questiondaNAT2 marksNeeds review
Consider the following tables, Loan and Borrower, of a bank.
Loan:
loan_num | branch_name | amount |
|---|---|---|
L11 | Banjara Hills | 9000 |
L14 | Kondapur | 5000 |
L15 | SR Nagar | 4000 |
L22 | SR Nagar | 2500 |
L23 | Balanagar | 8000 |
L25 | Kondapur | 7000 |
L19 | SR Nagar | 6500 |
Borrower:
customer_name | loan_num |
|---|---|
And | L11 |
Karteek | L11 |
Karteek | L14 |
Ankita | L15 |
Gopal | L19 |
Karteek | L22 |
Karteek | L23 |
Sunil | L23 |
Sunil | L25 |
Query:
where
denotes natural join.The number of tuples returned by the above relational algebra query is ______
(Answer in integer)
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 63
Open questiondaNAT2 marksNeeds review
Consider the following Python code snippet.
def f(a,b):
if (a==0):
return b
if (a%2==1):
return 2*f((a-1)/2,b)
return b+f(a-1,b)
print(f(15,10))
The value printed by the code snippet is ______ (Answer in integer)
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 64
Open questiondaNAT2 marksNeeds review
Consider the following pseudocode.
Create empty stack S
Set x=0, flag=0, sum=0
Push x onto S
while (S is not empty){
if (flag equals 0){
Set x = x+1
Push x onto S}
if (x equals 8):
Set flag=1
if (flag equals 1){
x = Pop(S)
if (x is odd):
Pop(S)
Set sum = sum + x}
}
Output sum
The value of sum output by a program executing the above pseudocode is ______
(Answer in integer)
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 65
Open questiondaNAT2 marksNeeds review
Consider a directed graph
, where
and
. Suppose the adjacency list of each vertex is in decreasing order of vertex number, and depth-first search (DFS) is performed at vertex 0. The number of vertices that will be discovered after vertex 50 is ______ (Answer in integer)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