Students find these Class 10 AI MCQ Chapter 3 Advanced Python Class 10 MCQ Online Test with Answers helpful for self-assessment and preparation.
Class 10 AI Advanced Python MCQ
MCQ on Advanced Python Class 10
Class 10 Advanced Python MCQ – Advanced Python MCQ Class 10
Multiple Choice Questions:
Question 1.
Which of the following is a loop statement?
(a) a + = 1
(b) if a >b;
(c) while a > 7:
(d) whilenot a > 7 :
Answer:
(c) while a > 7:
Question 2.
Which of the following statement(s) is/are incorrect about Python?
i. Python is an Object Oriented language
ii. Python is a machine level language
iii. Python needs high maintenance
iv. Python doesn’t focus on readability
(a) (i) and (iii) only ‘
(b) (ii), (iii) and (iv)
(c) (iv) only
(d) (ii) and (iii)
Answer:
(b) (ii), (iii) and (iv)
Question 3.
Which of the following is not used as a loop in Python?
(a) while
(b) for
(c) do while
(d) None of these
Answer:
(c) do while
Question 4.
Which symbol is used to represent a comment in Python?
(a) / /
(b) #
(c) – .
(d) !
Answer:
(b) #
Question 5.
What is a variable in Python used for?
(a) To store and manipulate data
(b) To perform calculations
(c) To draw shapes
(d) To display the comments
Answer:
(a) To store and manipulate data
Question 6.
Which function is used to take user input in Python?
(a) get_input()
(b) user_input()
(c) inputs()
(d) input()
Answer:
(d) input()
Question 7.
What is the purpose of control statements in Python?
(a) To control the flow of program execution
(b) To control the screen brightness
(c) To control the font size
(d) To control the flow of text
Answer:
(a) To control the flow of program execution
Question 8.
Which of the following is a valid data type in Python?
(a) character
(b) loop
(c) string
(d) new character
Answer:
(c) string
Question 9.
What command is used to display the output in Python?
(a) print()
(b) display()
(c) show()
(d) None of these
Answer:
(a) print()
Question 10.
Which symbol is used for exponentiation in Python?
(a) \wedge
(b) **
(c) %
(d) $
Answer:
(b) **
Question 11.
What is the purpose of packages in Python?
(a) To organise code into modules
(b) To wrap gifts
(c) To create graphics
(d) To organise data
Answer:
(a) To organise code into modules
Question 12.
Which of the following is not a valid data type in Python?
(a) float
(b) decimal
(c) complex
(d) int
Answer:
(b) decimal
Question 13.
What is the purpose of if statement in Python?
(a) To define a function
(b) To create a loop
(c) To make decisions in the code
(d) To swap values
Answer:
(c) To make decisions in the code
Question 14.
Which command is used to install external packages in Python?
(a) import
(b) install
(c) pip
(d) export
Answer:
(c) pip
Question 15.
Which of the following is a logical operator in Python?
(a) ++
(b) AND
(c) / /
(d) IF
Answer:
(b) AND
Question 16.
Which of the following is a correct match?
1. Keyword (i) Integer
2. Data type (ii) #
3. Comment (iii) finally
(a) 1 → (iii); 2 → (ii); 3 → (i)
(b) 1 → (i); 2 → (ii); 3 → (iii)
(c) 1 → (ii); 2 → (i); 3 → (iii)
(d) 1 → (iii) ; 2 → (i); 3 → (ii)
Answer:
(d) 1 → (iii) ; 2 → (i); 3 → (ii)
Statement Based Questions:
Question 1.
Statement 1 Jupyter Notebook App is a server-client application that allows editing and running notebook documents via a web browser.
Statement 2 Jupyter Notebook App can be executed on a local desktop requiring no internet access
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(a) Both Statement 1 and Statement 2 are correct
Question 2.
Statement 1 Python is a high-level, general-purpose, and very popular programming language.
Statement 2 It was created by James Gosling, and released in 1991.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(c) Statement 1 is correct but Statement 2 is incorrect
Question 3.
Statement 1 The prpcess of traversing a sequence is known as iteration.
Statement 2 Loop iterates until the final item of the sequence are reached.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(a) Both Statement 1 and Statement 2 are correct
Question 4.
Statement 1 Tuples, like lists, also contain a collection of items from various data types.
Statement 2 A parenthetical space [] separates the tuple’s components from one another.
(a) Both Statement 1 and Statement 2 are correct
(b) Both Statement 1 and Statement 2 are incorrect
(c) Statement 1 is correct but Statement 2 is incorrect
(d) Statement 2 is correct but Statement 1 is incorrect
Answer:
(c) Statement 1 is correct but Statement 2 is incorrect
Assertion & Reason Based Questions:
Question 1.
Assertion (A) A variable in Python can change its value during the execution of the program.
Reason ( R ) Python is a dynamically typed language.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct
Answer:
(a) Both A and R are correct and R is the correct explanation of A
Question 2.
Assertion (A) The if statement is used for conditional execution in Python.
Reason (R) The if statement is followed by a block of code that is executed only if the condition is true.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct
Answer:
(a) Both A and R are correct and R is the correct explanation of A
Question 3.
Assertion (A) The % operator is used for modulo arithmetic in Python.
Reason (R) The / operator is used for integer division in Python.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct
Answer:
(c) A is correct but R is not correct
Question 4.
Assertion (A) for loop is also called as “Entry controlled loop”.
Reason (R) For loop can be written to traverse a sequence.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct
Answer:
(b) Both A and R are correct but R is not the correct explanation of A
Question 5.
Assertion (A) The while loop in Python is used to repeat a block of code while a condition is true.
Reason (R) The for loop in Python is used to iterate over a sequence of values.
(a) Both A and R are correct and R is the correct explanation of A
(b) Both A and R are correct but R is not the correct explanation of A
(c) A is correct but R is not correct
(d) A is not correct but R is correct
Answer:
(b) Both A and R are correct but R is not the correct explanation of A
The post Advanced Python Class 10 MCQ Online Test appeared first on Learn CBSE.