Introduction to Programming Quiz - CBSE Class 8 ICT
Free practice quiz: Introduction to Programming (CBSE Class 8 ICT). 20 multiple-choice questions with answers and explanations. Play online, no sign-up needed.
Play all 20 questions freeSample questions
What is an algorithm in programming?
- A step-by-step procedure to solve a problem
- A random guess to solve an issue
- A way to make computers faster
- A type of hardware component
Show answer
Answer: A. A step-by-step procedure to solve a problem
An algorithm is a defined set of steps that provides instructions on how to solve a problem.
Which of the following is a characteristic of object-oriented programming?
- Procedural programming
- Object-oriented programming involves using objects and classes
- Machine-level programming
- Using only numerical data types
Show answer
Answer: B. Object-oriented programming involves using objects and classes
Object-oriented programming is a paradigm centered around using objects and classes to structure software applications.
In programming, what is a loop used for?
- To create graphical elements
- To repeat a block of code multiple times
- To store data
- To write documentation
Show answer
Answer: B. To repeat a block of code multiple times
Loops are used in programming to execute a block of code repeatedly under certain conditions.
Which of the following symbols is commonly used for comments in many programming languages?
- #
- &
- $
- %
Show answer
Answer: A. #
The '#' symbol is used to denote comments in many programming languages, indicating that the text following it is for the programmer’s reference.
What is the significance of indentation in Python?
- Ignored by the compiler
- Used to indicate code structure and scope
- Only for aesthetics
- Can be replaced by semicolons
Show answer
Answer: B. Used to indicate code structure and scope
In Python, indentation is critical as it defines the structure and flow of the control of a program.