Which module in Python is used for working with binary data and provides methods for packing and unpacking binary data structures?
A:
binstruct
B:
structlib
C:
binary
D:
struct
Answer:D
The struct module in Python provides methods for packing and unpacking binary data structures.
Discuss About this Question.
What does the calendar module in Python provide?
A:
Handling compressed files
B:
Mathematical operations
C:
Working with dates and times
D:
Manipulating calendar data
Answer:D
The calendar module in Python provides functionality for manipulating calendar-related data, such as determining leap years and generating month calendars.
Discuss About this Question.
What is the purpose of the logging module?
A:
Handling dates and times
B:
Working with regular expressions
C:
Generating random numbers
D:
Logging messages to various outputs
Answer:D
The logging module in Python provides a flexible framework for emitting log messages from Python programs.
Discuss About this Question.
What is the purpose of the unicodedata module?
A:
Working with regular expressions
B:
Handling compressed files
C:
Manipulating Unicode character data
D:
Parsing JSON data
Answer:C
The unicodedata module in Python provides access to the Unicode Character Database, allowing manipulation of Unicode character data.
Discuss About this Question.
Which module in Python is used for working with mathematical functions, including trigonometry and logarithms?
A:
mathlib
B:
cmath
C:
trigmath
D:
math
Answer:D
The math module in Python provides mathematical functions, including trigonometry and logarithms.
Discuss About this Question.
Ad Slot (Above Pagination)
Install ExamAdept
Fast access — add this app to your device.
To install on iPhone/iPad: tap Share → Add to Home Screen.
Discuss About this Question.