Class 12 Computer Science Chapter 2 Advanced Python Programming Quiz 2 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Data Frame contains?
2. Which of the follwoing looping statement(s) is/are invalid in Python
3. What is the difference between '==' and 'is'?
4. How do you define a function that takes two parameters, 'fname' and 'lname'?
5. In Python, what does the 'return' statement do in a function?
6. S1 = pd.series([11, 12, 13, 14])s2 = pd.series([11, 12, 13, 14], index=[1, 2, 3, 4])print(s1+s2) gives?
7. What does 'len("hello")' return?
8. Which of the following is the output of the below Python code?var1 = lambda var:var * 2ret = lambda var:var * 3result = 2result = var1(result)result = ret(result)result = var1(result)print(result)
9. Which collection is ordered, changeable, and allows duplicate members?
10. How do you display output in Python using the print() function?
11. Why is it important to follow proper naming conventions for variables and functions in Python?
12. What is the primary use of the print command in Python?
13. What happens to the text entered by the user when using the input() function in Python?
14. Patients visit hospital everyday. You want to count for the "new patients" for each day. Which one is not necessary?
15. Which of the following is the output of the instructions given below?mylist=[1, 5, 9, int('0')]print(sum(mylist))
16. Find the output of the given Python program?print(list("abcd" .split(" )))
17. What is the purpose of the 'else' statement in Python conditional statements?
18. Method used to bring data from a csv file into a DataFrame
19. Which device is required for the Internet connection?
20. What is the output of the following Python code snippet? print(5 + 3 * 2)
21. What will be the output of the following Python code snippet?not(10<20) and not(10>30)
22. The instructor wants to know the age of the persons with rank3. Help her to identify the correct set of statement/s from the given options:
23. Which among these are the special operators in python
24. Select the reserved keyword in python-
25. How do you create a for loop in Python?