Questions 11–20 of 46. Imported answers require independent review unless marked reviewed.

Topic practice 46 questionsPage 2 of 5

Question 58

Open question
DANAT2 marksNeeds review
Consider the given Python program.
def fun(L, i=0):
if i >= len(L)-1:
return 0
if L[i] > L[i+1]:
L[i+1], L[i] = L[i], L[i+1]
return 1+fun(L, i+1)
else:
return fun(L, i+1)

data = [5, 3, 4, 1, 2]
count = 0
for _ in range(len(data)):
count += fun(data)
print(count)
The output of the program 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

Question 59

Open question
DANAT2 marksNeeds review
Let there be two relations

and

as shown.

has three columns

,

and

.

has two columns

and

.



P1
Q1
R1
P2
Q2
R2
P3
Q3
R2


P1
10
P1
15
P2
20
P3
1
Consider that the following tuple relational calculus expression is evaluated.

The number of tuples that will be returned 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

Question 60

Open question
DANAT2 marksNeeds review
Let Account be a relation as shown.
AccNo
Balance
A1
5000
A2
5000
A3
1000
A4
1500
A5
1800
Consider the given SQL query.
SELECT AccNo FROM Account AS A
WHERE (SELECT COUNT(*) FROM Account AS B
WHERE A.Balance < B.Balance) >= (SELECT COUNT(*)
FROM Account AS C WHERE A.Balance > C.Balance)
The number of rows returned by the SQL 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 answer

Question 61

Open question
DANAT2 marksNeeds review
Consider an ER model with the entities E1 (A₁₁, A₁₂, A₁₃) and E2 (A₂₁, A₂₂, A₂₃), where, A₁₁, A₁₂, A₁₃ are the attributes of E1, and A₂₁, A₂₂, A₂₃ are the attributes of E2. Let A₂₂ be a multi-valued attribute. A₁₁ and A₂₁ are the primary keys of E1 and E2, respectively.
Let R12 be a many-to-many relationship between E1 and E2. Participation of both E1 and E2 in R12 is total.
The minimum number of relations required to convert the ER model into relational model (assuming there is no other functional dependency) where each relation is in third normal form (3NF) 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

Question 62

Open question
DANAT2 marksNeeds review
For a given data set

, where

, it is known that

Let us denote

The value of

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

Question 63

Open question
DANAT2 marksNeeds review
Let

be a random variable that follows

distribution. The conditional distribution of the random variable

given

is the

distribution.
The value of

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

Question 64

Open question
DANAT2 marksNeeds review
Let

be a matrix such that each of its elements follows

distribution independently.
The probability that the row-sum of the second row and the column-sum of the third column are both equal to 3 is ________ . (Rounded off to two decimal places)

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

Question 65

Open question
DANAT2 marksNeeds review
Let

be a matrix, where

and

is the identity matrix of order

.
The value of

, where

, 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

Question 31

Open question
daNAT1 markNeeds review
There are three boxes containing white balls and black balls.
Box-1 contains 2 black and 1 white balls.
Box-2 contains 1 black and 2 white balls.
Box-3 contains 3 black and 3 white balls.
In a random experiment, one of these boxes is selected, where the probability of choosing Box-1 is

, Box-2 is

, and Box-3 is

. A ball is drawn at random from the selected box. Given that the ball drawn is white, the probability that it is drawn from Box-2 is ________ (Round off to two decimal places)

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

Question 32

Open question
daNAT1 markNeeds review

____________ (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 answer