Class 10 Computer Science · Chapter 4 · Test 1
Test 1: Decision Making and Loops
30 questions · 25 min · 30 marks
Want to try first? Take the free Computer Science test: 94hbp-7gz9m-ufent-tsj4r
Sample questions
The first 5 of 30. Try each one, then tap to see the answer.
Question 1
What is the purpose of control structures in programming?
- AOnly to make code longer
- BTo manage decision-making and repetition of tasks
- CTo create variables
- DTo import libraries
Show answerHide answer
Answer: B
Control structures help manage the decision-making process and the repetition of tasks in programs.
Question 2
Which of the following are the two main types of control structures?
- ADecision making and Looping
- BTesting and Debugging
- CImporting and Exporting
- DCreating and Sorting
Show answerHide answer
Answer: A
The two main types of control structures are Decision making and Looping.
Question 3
What does decision making in programming allow the program to do?
- ARepeat a block of code forever
- BChoose different actions based on conditions
- CStore a collection of items
- DFind and fix bugs
Show answerHide answer
Answer: B
Decision making allows the program to choose different actions based on conditions.
Question 4
Which statement runs a block of code only if a condition is true?
- Aif
- Bfor
- Crange()
- Dimport
Show answerHide answer
Answer: A
The if statement lets us make decisions based on conditions. If the condition is true, it runs a block of code.
Question 5
What defines the structure, block or scope of code in Python?
- ACurly braces
- BSemicolons
- CIndentation
- DParentheses
Show answerHide answer
Answer: C
In Python indentation defines the block or scope of your code and is mandatory.
More tests in Control Structures in Python
- 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 4: Short Questions – Part 1
Short questions · 25 questions · 50 min · 62 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.