Certified Associate in Python Programming (PCAP) — Question 99
Which one of the platform module functions should be used to determine the underlying platform name?
Answer options
- A. platform.python_version()
- B. platform.processor()
- C. platform.platform()
- D. platform.uname()
Correct answer: C
Explanation
The correct answer is C, platform.platform(), as it returns a string identifying the underlying platform. The other options provide different information: A gives the version of Python, B provides the processor name, and D returns a named tuple including information about the system but not specifically the platform name.