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

Quiz Instructions

Select an option to see the correct answer instantly.

1. The method to install tkinter in system is .....
2. Explain the concept of 'nested loops' in Python.
3. What is the difference between a while loop and a for loop in Python?
4. Which of the following declarations is incorrect?
5. Mandatory arguments required to connect any database from pyton
6. It is the process of joining two or more strings.
7. Which command will display the text 'Hello world!' on the screen?
8. What will be the output of the following Python code?a={1:"A", 2:"B", 3:"C"}a.items()
9. What is the output of print(type("Hello")) in Python?
10. What symbol is used to denote "not equal" ?
11. What is the output of the following codex = 6 y = 2print(x ** y) print(x // y)
12. Determine the output of the below Python code fragment?var1 = Truevar2 = Falsevar3 = Falseif var1 or var2 and var3:print("True")else:print("False")
13. Select the correct statement in python to check SQL connectivity status.
14. Explain the concept of functions in Python.
15. Which data type is the best to store possible outcome of tossing a dice?
16. Which built-in function returns the absolute value?
17. Which of the following is not used as loop in Python?
18. What is the purpose of the interactive mode in Python?
19. The acronym csv is short for
20. Which keyword is used to create an alias while importing a module in Python?
21. In Python3, which functions are used to accept input from the user
22. The ..... provides pictorial representation of given problem.
23. Data Frame contains?
24. Which of the follwoing looping statement(s) is/are invalid in Python
25. What is the difference between '==' and 'is'?
26. How do you define a function that takes two parameters, 'fname' and 'lname'?
27. In Python, what does the 'return' statement do in a function?
28. S1 = pd.series([11, 12, 13, 14])s2 = pd.series([11, 12, 13, 14], index=[1, 2, 3, 4])print(s1+s2) gives?
29. What does 'len("hello")' return?
30. 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)
31. Which collection is ordered, changeable, and allows duplicate members?
32. How do you display output in Python using the print() function?
33. Why is it important to follow proper naming conventions for variables and functions in Python?
34. What is the primary use of the print command in Python?
35. What happens to the text entered by the user when using the input() function in Python?
36. Patients visit hospital everyday. You want to count for the "new patients" for each day. Which one is not necessary?
37. Which of the following is the output of the instructions given below?mylist=[1, 5, 9, int('0')]print(sum(mylist))
38. Find the output of the given Python program?print(list("abcd" .split(" )))
39. What is the purpose of the 'else' statement in Python conditional statements?
40. Method used to bring data from a csv file into a DataFrame
41. Which device is required for the Internet connection?
42. What is the output of the following Python code snippet? print(5 + 3 * 2)
43. What will be the output of the following Python code snippet?not(10<20) and not(10>30)
44. 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:
45. Which among these are the special operators in python
46. Select the reserved keyword in python-
47. How do you create a for loop in Python?
48. SQL command for list databases.
49. The symbol used for giving Comments in Python is
50. What is the purpose of setting the path in Windows for Python?
51. How does Python interact with the hardware of a computer?
52. The ..... will be useful to access all the elements in a nested tuple.
53. WHAT ARE THE SEMANTIC RULES OF A LANGUAGE CALLED?
54. What is one of the reasons why programmers use the Python programming language?
55. In a nested tuple, each tuple is considered as an .....
56. Which of the following statement/s will give 2 rows from bottom of the dataframe?
57. What is the correct way to handle exceptions in Python?
58. What is the purpose of loops in Python?
59. What is the output of the following Python code snippet?string = "Hello, World!"print(string[3:7])
60. Which of these collections defines a SET?