Python Programming Proficiency (Advanced Level)

  • 23m
  • 23 questions
The Python Programming Proficiency (Advanced Level) benchmark evaluates your ability to work with text and formatted files, handle exceptions in Python code, and handle script executions from the command line. You will be assessed on your skills in using built-in Python modules, packaging custom modules for distribution, implementing Python virtual environments, distinguishing between versions 2 and 3 of Python, and converting Python 2 scripts to be compatible with Python 3. A learner who scores high on this benchmark demonstrates that they have the skills to perform advanced Python operations like file and exception handling and can work with modules and packages.

Topics covered

  • activate and run Python scripts from within virtual environments
  • control how you handle exceptions that your code may raise
  • convert a Python 2 script to be Python 3 compatible using the 2to3 conversion tool
  • convert code prototyped in a Jupyter notebook into a Python script that can be executed from a shell
  • convert Python dictionaries and lists into JSON strings and files
  • define a customized file format creating a CSV dialect and use that to parse and write data
  • define multiple except blocks to handle various exceptions that can be raised by your code
  • define the names and other customizable features of command line arguments to a Python script using the argparse module
  • distinguish between the r+ and a+ modes to read from and write to a file
  • identify some of the file formats that can be handled by the CSV module in Python
  • install different packages in different virtual environments and recognize how they are isolated from each other
  • install the virtualenv tool and use it to create a virtual environment for Python applications
  • package Python code into a tar archive for distribution to end users
  • parse and use the arguments passed to a Python script from the command line
  • recall the differences between opening a file in write mode and append mode
  • recall the variations in syntax and output for various operations such as print, division, and round for Python 2 versus Python 3
  • recognize how exceptions are defined in a hierarchy and how related exceptions can be caught and handled
  • recognize the differences between the read(), readline(), and readlines() functions when working with files in Python
  • recognize the features available in popular Python libraries such as NumPy, random, and datetime
  • use a try and except block to handle a Python exception
  • use pip to install a module in your environment and import it into your Python applications
  • use pre-built Python modules to perform common operations by importing them into your source code
  • use the 2to3 conversion tool to identify the lines in your Python 2 scripts that need to be altered for Python 3 compatibility

recently added courses