Login using Social Account
Login using your credentials
Finally, we will call vulture to detect the dead code in the dead_code.py script.
vulture
dead_code.py
Call Vulture to detect the dead code
Vulture
vulture dead_code.py
Observe the results. It gives the file name, line number which contains the dead code, the code itself, and finally the probability of that code being a dead code. Due to Python's dynamic nature, static code analyzers like Vulture are likely to miss some dead code. Also, code that is only called implicitly may be reported as unused. Nonetheless, Vulture can be a very helpful tool for higher code quality.
What is the probability percentage for the following line of code being a dead code as given by Vulture?
import os
%
Taking you to the next exercise in seconds...
Stay here Next Exercise
Want to create exercises like this yourself? Click here.
No hints are availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed here
1 What is Vulture?
2 Create a project directory
3 Create a virtual environment
4 Install Vulture using pip
5 Create sample Python script with dead code
6 Invoke Vulture to detect dead code
7 Deactivate virtual environment and delete project directory
Loading comments...