Security Operations
A script begins with "import requests" and defines its functions with "def". Which scripting language is it written in?
Show the answer
Correct answerB. Python
AWhy not this: PowerShell declares functions with the function keyword and loads modules with Import-Module, not a bare import statement.
BWhy this is right: The import statement for libraries such as requests and def for functions are standard Python syntax.
CWhy not this: Bash defines functions with name() or the function keyword and calls commands, with no import statement.
DWhy not this: Batch files use labels, call and goto, and have no function definitions or library imports.
Python uses "import" to load libraries such as requests and "def" to define functions. PowerShell is the closest confusion, but its scripts use cmdlets with Verb-Noun names and "function" rather than "import" and "def".