Display the version and platform variables of the sys


Question: Finding more about the sys module with dir().

(a) Start the Python interpreter again. Run the dir() command as in the previous exercise. Now import the sys module by typing import sys at the prompt. Run the dir() command again to verify that the sys module now shows up. Now run the dir() command on the sys module by typing dir(sys). Now you see all the attributes of the sys module.

(b) Display the version and platform variables of the sys module. Be sure to prepend the names with sys to indicate that they are attributes of sys. The version variable contains information regarding the version of the Python interpreter you are using, and the platform attribute contains the name of the computer system that Python believes you are running on.

(c) Finally, call the sys.exit() function. This is another way to quit the Python interpreter in case the keystrokes described above in problem 1 do not get you out of Python.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Display the version and platform variables of the sys
Reference No:- TGS02577888

Expected delivery within 24 Hours