As per the NTA key, a compiler translates source code into machine-readable code. Strictly speaking, an interpreter converts code line by line, while a compiler translates the whole program at once.
Note: The question describes line-by-line conversion, which matches an interpreter, but the NTA key marks Compiler as correct; we have followed the official key.