Quantcast
Channel: Learn CBSE
Viewing all articles
Browse latest Browse all 11328

Python Conditional and Looping Statements Class 9 AI MCQ Online Test

$
0
0

Students find these Class 9 AI MCQ Chapter 8 Python Conditional and Looping Statements Class 9 AI MCQ Online Test with Answers helpful for self-assessment and preparation.

Class 9 AI Python Conditional and Looping Statements MCQ

MCQ on Python Conditional and Looping Statements Class 9

Class 9 Python Conditional and Looping Statements MCQ – Python Conditional and Looping Statements MCQ Class 9

Multiple Choice Questions

Question 1.
Which statement is a sequence of more than one statements?
(a) Control statement
(b) Compound statement
(c) Single statement
(d) Sequence statement
Answer:
(b) Compound statement

Question 2.
Which function is used to generate a sequence of numbers overtime?
(a) range ()
(b) len ()
(c) limit ()
(d) lim ()
Answer:
(a) range ()

Python Conditional and Looping Statements Class 9 AI MCQ Online Test

Question 3.
These statements enable a program with a cyclic flow of logic.
(a) Sequence
(b) Compound
(c) Single
(d) Iterative
Answer:
(d) Iterative

Question 4.
While loops are called as
(a) entry control loops
(b) exit control loops
(c) Both (a) and (b)
(d) None of these
Answer:
(a) entry control loops

Question 5.
A computer program is a set of instructions and are also known as
(a) compounds
(b) statements
(c) blocks
(d) comments
Answer:
(b) statements

Python Conditional and Looping Statements Class 9 AI MCQ Online Test

Question 6.
In Python programming, which statements are used for controlling the flow of a program? Choose the correct options.
(i) Sequence statements
(ii) Selection statements
(iii) Iterative statements
(iv) Conditional statements
(a) Only (i)
(b) Both (ii) and (iii)
(c) (ii), (iii) and (iv)
(d) (i), (ii) and (iii)
Answer:
(c) (ii), (iii) and (iv)

Statement Based Questions

Question 1.
Statement 1 In Python, the “if” statement is used for making decisions based on a condition.
Statement 2 The “if-else” statement allows for the execution of different code blocks based on a condition.
(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 1 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 Sequence statements in Python are executed in the order they appear in the code.
Statement 2 The “elif” keyword is used for creating multiple conditions in a selection statement.
(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

Python Conditional and Looping Statements Class 9 AI MCQ Online Test

Question 3.
Statement 1 The “for” loop in Python is used for iterative statements and executes a block of code a specific number of times.
Statement 2 The “while” loop in Python is an example of a selection statement.
(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 The while loop in Python allows the execution of a block of code repeatedly as long as a specified condition is correct.
Reason Iterative statements, like the while loop, are used for creating repetitive tasks and help in automating processes.
(a) Both Assertion and Reason are correct, and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are correct, but Reason is not the correct explanation for Assertion.
(c) Assertion is correct, but Reason is incorrect.
(d) Assertion is incorrect, but Reason is correct.
Answer:
(a) Both Assertion and Reason are correct, and Reason is the correct explanation for Assertion.

Question 2.
Assertion The “for” loop in Python is used for iterative statements, allowing a set of statements to be executed repeatedly.
Reason The “for” loop is especially useful when the number of iterations is known beforehand.
(a) Both Assertion and Reason are correct, and Reason is the correct explanation of Assertion.
(b) Both Assertion and Reason are correct, but Reason is not the correct explanation of Assertion.
(c) Assertion is correct, but Reason is incorrect.
(d) Assertion is incorrect, but Reason is correct.
Answer:
(a) Both Assertion and Reason are correct, and Reason is the correct explanation of Assertion.

Python Conditional and Looping Statements Class 9 AI MCQ Online Test

Question 3.
Assertion In Python, the if statement is used for making decisions based on the evaluation of a condition.
Reason Selection statements help in controlling the flow of a program by executing different code blocks depending on whether a condition is correct or incorrect.
(a) Both Assertion and Reason are correct, and Reason is the correct explanation for Assertion.
(b) Both Assertion and Reason are correct, but Reason is not the correct explanation for Assertion.
(c) Assertion is correct, but Reason is incorrect.
(d) Assertion is incorrect, but Reason is correct.
Answer:
(b) Both Assertion and Reason are correct, but Reason is not the correct explanation for Assertion.

The post Python Conditional and Looping Statements Class 9 AI MCQ Online Test appeared first on Learn CBSE.


Viewing all articles
Browse latest Browse all 11328

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>