Programming Basics Question Set 3
Section A: (1 mark × 10 = 10 marks)
1. What is a singly linked list?
2. How is a binary tree different from a general tree?
3. Give one reason for enforcing code formatting.
4. What is a docstring in Python?
5. What does the term “clean code” imply?
6. Give an example of a refactoring technique.
7. Name any two types of testing.
8. What does git push do?
9. Define conflict resolution in version control.
10. Why is modular code preferred?
Section B: (5 marks × 3 = 15 marks)
11. Explain how using code reviews and documentation can improve team
collaboration.
12. Compare Arrays, Linked Lists, and Trees based on structure, performance, and
use cases.
13. Identify code smells in the following snippet and suggest improvements:
def process(data):
if data != None:
if len(data) > 0:
for d in data:
print(d)