Certified Associate in Python Programming (PCAP-31-03) — Question 89
Which one of the platform module functions should be used to determine the underlying OS version?
Answer options
- A. platform.processor()
- B. platform.version()
- C. platform.python_version()
- D. platform.python_version_tuple()
Correct answer: B
Explanation
The correct answer is B, as the platform.version() function specifically retrieves the OS version. Option A, platform.processor(), returns information about the processor, while C and D relate to the Python version, not the OS version.