A triage script starts a function with def, imports hashlib, and uses indentation to mark the block. Which language is the script?
Select an answer to reveal the explanation.
Short Explanation
The shape of the lines tells you the language before you translate a single word. This script is Python, written with def, an import of hashlib, and indentation marking the block. PowerShell and JavaScript group blocks in braces, and a Bash function does not bring in hashlib that way.
Full Explanation
Python marks a block by indentation, introduces a function with def, and loads its hashing module with an import of hashlib. That is the script in front of you. PowerShell is declared with a function keyword, and its blocks are grouped in braces rather than by indentation, and it would not express this work as an import of hashlib. Bash is written as a shell function that hashes input with a core utility in the path, and it does not use def or hashlib. JavaScript is declared as a function that loads helper code through a require call, again with braces rather than Python indentation. A flattened paste can hide indentation, so the def line and the hashlib import are the clues to confirm in the real file. Braces around a function body would point somewhere else, and they are not what marks this block. Exam caveat: similar dollar signs or the word function in another language do not outweigh def plus hashlib plus indentation. Operational check: open the source, point at def, the hashlib import, and the indented block, and choose the Python interpreter for any later safe run.