The interpreter reads each statement line by line, on the other hand, the compiler translates all the code into machine code.
the compiler translates all the code into machine code while the interpreter reads each statement line by line.