InfytQ Control structures -Quiz 4

Question 1

Time: 00:00:00
Which among the following is valid if condition

if  x>98

if  x>98

if (x>98)

if (x>98)

if x>=98:

if x>=98:

if x>=98

if x>=98

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Which of the following  are not a selection statement in python

if

if

switch

switch

if-else

if-else

elif

elif

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
How many times the following loop will run

for I in range(1,10,3)

1

1

2

2

3

3

4

4

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
What signifies the end of a if block

end

end

curly braces, }

curly braces, }

indentation

indentation

#

#

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00

a,b=10,5
if(a>b):print(a)
else:print(b)


What thus this code does?

Throws logical error

Throws logical error

Indentation error

Indentation error

Minimum value of a and b

Minimum value of a and b

Maximum value of a and b

Maximum value of a and b

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00

a,b=10,5
if(a==b):print(a,a)
else:print(a,b)


What thus this code does?

Throws logical error

Throws logical error

Indentation error

Indentation error

prints a and b value or a value based on the values of a,b

prints a and b value or a value based on the values of a,b

prints a,b values in any case

prints a,b values in any case

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]

Personalized Analytics only Availble for Logged in users

Analytics below shows your performance in various Mocks on PrepInsta

Your average Analytics for this Quiz

Rank

-

Percentile

0%

Completed

0/0

Accuracy

0%

Comments