sscasc@tumkur python virtual machine (pvmor interpreter python converts the source code into byte code byte code represents the fixed set of instructions created by python developers representing all types of operations the size of each byte code instruction is byte the role of pvm is to convert the byte code instructions into machine code so that the computer can execute those machine code instruction and display the final output the pvm is also called as interpreter python shell python interpreter is program which translates your code into machine language and then executes it line by line we can use python interpreter in two modes interactive mode script mode in interactive modepython interpreter waits for you to enter command when you type the commandpython interpreter goes ahead and executes the commandthen it waits again for your next command in script modepython interpreter runs program from the source file interactive mode python interpreter in interactive mode is commonly known as python shell to start the python shell enter the following command in terminal or command promptto start the python shell enter python instead of just python @vm:~python python (defaultnov : : [gcc on linux type "help""copyright""creditsor "licensefor more information what you are seeing is called python shell is known as prompt stringit simply means that python shell is ready to accept you commands python shell allows you type python code and see the result immediately in python shellenter the following calculations one by one and hit enter to get the result script mode python shell is great for testing small chunks of code but there is one problem the statements you enter in the python shell are not saved anywhere in caseyou want to execute same set of statements multiple times you would be better off to save the entire code in file thenuse the python interpreter in script mode to execute the code from file sp_python programming