Class 10 Computer Science · Chapter 4 · Test 2
Test 2: Libraries, Lists, Testing and Debugging
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
Python offers an extensive standard library that includes:
- AOnly external packages
- BBuilt-in modules and data structures
- COnly graphics tools
- DOnly operating system files
Show answerHide answer
Answer: B
Python's extensive standard library includes built-in modules and data structures.
Question 2
What does a data structure refer to?
- AA particular format or method for organizing and storing data
- BA type of loop
- CA syntax error
- DA debugging tool
Show answerHide answer
Answer: A
A data structure is a particular format or method for organizing and storing data.
Question 3
In Python, libraries are like:
- AToolboxes full of useful tools
- BEmpty folders
- CError messages
- DLoops
Show answerHide answer
Answer: A
Libraries are like toolboxes or pre-built toolkits that help solve problems without building everything from scratch.
Question 4
Which library is used to generate random numbers?
- ADatetime
- Bstatistics
- Crandom
- Dmath
Show answerHide answer
Answer: C
The random library is used to generate random numbers.
Question 5
Which keyword is used to bring a library into your Python program?
- Aimport
- Binclude
- Cusing
- Dload
Show answerHide answer
Answer: A
Libraries are brought into a program using the import statement.
More tests in Control Structures in Python
- Test 1: Decision Making and Loops
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.