Class 10 Computer Science · Chapter 4 · Test 4
Test 4: Short Questions – Part 1
25 questions · 50 min · 62 marks
Want to try first? Take the free Computer Science test: 94hbp-7gz9m-ufent-tsj4r
Sample questions with answers
The first 5 of 25, each with a model answer. Try writing yours first.
Question 1 · 2 marks
What are control structures?
Show model answerHide model answer
Control structures are used to control the flow of a program based on different conditions or to repeat certain actions multiple times. They help manage decision-making and the repetition of tasks.
Question 2 · 2 marks
Name the two main types of control structures.
Show model answerHide model answer
The two main types are Decision making and Looping.
Question 3 · 2 marks
What is decision making in programming? Give a real-life example.
Show model answerHide model answer
Decision making allows the program to choose different actions based on conditions.
Example: deciding whether to take an umbrella based on the weather situation.
Question 4 · 3 marks
What is the use of the if statement? Write its syntax.
Show model answerHide model answer
The if statement lets us make decisions based on conditions. If the condition is true, it runs a block of code. Syntax: if condition: code to run if the condition is true
Question 5 · 2 marks
Why is indentation mandatory in Python?
Show model answerHide model answer
In Python, indentation defines the structure, block or scope of the code. Incorrect indentation may cause an IndentationError.
More tests in Control Structures in Python
- Test 1: Decision Making and Loops
MCQs · 30 questions · 25 min · 30 marks
- Test 2: Libraries, Lists, Testing and Debugging
MCQs · 30 questions · 25 min · 30 marks
- Test 3: Complete Chapter Review
MCQs · 30 questions · 25 min · 30 marks
- Test 5: Short Questions – Part 2
Short questions · 25 questions · 50 min · 63 marks
- Test 6: Long Questions
Long questions · 10 questions · 50 min · 59 marks
Practise with a free account
Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.