InfyTQ Collections Quiz 1

Question 1

Time: 00:00:00
Collection is a ______ data-type.

Sequential.

Sequential.

Container.

Container.

Numeric.

Numeric.

Integer.

Integer.

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

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
Collection is _______!

High-performance container data-type

High-performance container data-type

General purpose data-type

General purpose data-type

Low-performance container data-type

Low-performance container data-type

High-performance General purpose data-type.

High-performance General purpose data-type.

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

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
Counter function in the collection is used to :

counting hashable objects

counting hashable objects

Counting objects in the program

Counting objects in the program

Counting iterator in code

Counting iterator in code

Counting occurrence of the element

Counting occurrence of the element

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 does OrderDict() does:

Remember the entries were added.

Remember the entries were added.

Remember the order entries were added.

Remember the order entries were added.

Remember the order entries were deleted.

Remember the order entries were deleted.

Remembers the entries were deleted.

Remembers the entries were deleted.

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

Please login to submit your explanation

Start

Question 5

Time: 00:00:00

Set = {1, 1, 2, 3, 4, 4} 
print(Set) 


Predict the output:(ignore the order of numbers as set is unordered)

[1, 1, 2, 3, 4, 4]

[1, 1, 2, 3, 4, 4]

{1, 2, 3, 4}

{1, 2, 3, 4}

[1, 2, 3, 4]

[1, 2, 3, 4]

{1, 1, 2, 3, 4, 4}

{1, 1, 2, 3, 4, 4}

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

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
Set = {30, 40, 50}
Set.update([10, 20, 30])
print(Set)

Predict the output:(ignore the order of numbers as set is unordered)

Cannot update the set

Cannot update the set

{10, 20, 30, 40, 50}

{10, 20, 30, 40, 50}

(10, 20, 30, 40, 50)

(10, 20, 30, 40, 50)

[10, 20, 30, 40, 50]

[10, 20, 30, 40, 50]

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

Please login to submit your explanation

Start

Question 7

Time: 00:00:00

Set = {10, 20, 30, 40} 
Set2 = Set.copy() 
Set2.add(50) 
print(Set)


Predict the output:(ignore the order of numbers as set is unordered)

{10, 20, 30, 40}

{10, 20, 30, 40}

Error

Error

[10, 20, 30, 40]

[10, 20, 30, 40]

{10, 20, 30,40,50}

{10, 20, 30,40,50}

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

Please login to submit your explanation

Start

Question 8

Time: 00:00:00

arr = list('123456') 
arr[0] = arr[5] = 0
arr[3] = arr[-2] 
print(arr)


What will be the output of the following code:

023450

023450

[0, '2', '3', '5', '5', 0]

[0, '2', '3', '5', '5', 0]

(0, '2', '3', '5', '5', 0)

(0, '2', '3', '5', '5', 0)

Error

Error

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

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
Tu = tuple('PrepI') 
aa, bb, cc, dd, ee = Tu 
bb = cc = '*'
Tu = (aa, bb, cc, dd, ee) 
print(Tu)

Guess the output of the above python code

('P', '*', '*', 'p', 'I')

('P', '*', '*', 'p', 'I')

('P', 'r', 'e', 'p', 'I')

('P', 'r', 'e', 'p', 'I')

PrepI

PrepI

Error

Error

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

Please login to submit your explanation

Start

Question 10

Time: 00:00:00

Tuple = (3e-04, False, True, 8.12, 1.111, True) 
value = 0
for z in Tuple: 
    value += int(z) 
print(value)


Predict the output of the python code:

9.001

9.001

9

9

10

10

11

11

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/10

Accuracy

0%

Get Prepinsta Prime

Get all 200+ courses offered by Prepinsta

Never Miss an OffCampus Update

Get OffCampus Updates on Social Media from PrepInsta

Follow us on our Media Handles, we post out OffCampus drives on our Instagram, Telegram, Discord, Whatsdapp etc.

Get Hiring Updates
Amazon,Google,Delottie & 30+companies are hiring ! Get hiring Updates right in your inbox from PrepInsta

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others.

Get PrepInsta Prime Subscription

Get access to all the courses that PrepInsta offers, check the out below -

Companies

TCS, Cognizant, Delloite, Infosys, Wipro, CoCubes, KPMG, Amazone, ZS Associates, Accenture, Congnizant & other 50+ companies

Programming

Data Structures, Top 500 Codes, C, C++, Java Python & other 10+ subjects

Skills

Full Stack Web Development, Data Science, Machine Learning, AWS Cloud, & other 10+ skills and 20+ projects

Comments