Test your knowledge in python

Read Time: < 1 min

#1. What is the difference between tuple and list in python

Select all that apply:

the list is mutable

next

#2. List the data types used in python

Select all that apply:

next

#3. Correct way to convert a = '9', string object into integer:

next

#4. What is the difference between array and list

next

#5. Break allows loop termination once condition is met then control is transferred to next statement:

next

#6. Continue allows skipping some part of the loop and control is transferred to beginning of loop once condition is met:

next

#7. mylist = [1,4,5,6] how will you fetch last element of the list i.e. 6?

Select all that apply:

next

#8. Advantage of using numpy array over nested list:

Select all that apply:

next

#9. List comprehension is used for:

next

#10. mystr = "python is used for data-science" output of mystr.split() will be:

next

#11. mylist = ['python','data'] , output of mylist.append('science') will be:

next

#12. mylist = [2,[4,3]] length of mylist is:

next

#13. x = [2,3,4,5,6,7] output of x[2:] will be

next

#14. input: mylist = [' python'] output: mylist = ['python'] how will you get this:

Select all that apply:

next

#15. input: a = [23,45,2,6] output: a = [2,6,23,45] how to get this:

finish

Results

-

Read Time: < 1 min

Congratulations!!! you have passed the test!!

 

Read Time: < 1 min

No worries!!

It’s just unfinished success!!

Learn and try again!!

Leave a Reply

You cannot copy content of this page