0

How to perform simple operations in Linux terminal

>>> 2+2 4

24th Jul 2016, 7:39 AM
Nashville Fernandes
Nashville Fernandes - avatar
3 Respuestas
+ 2
You also can try to write a .py file, write some code, and input 'python3 <your file name>.py' to run your code.
24th Jul 2016, 7:56 AM
王如溱
王如溱 - avatar
+ 1
python is preinstalled on all unix-like systems. Thus you can simply type 'python' in your commandline and thereby open the python shell. Alternatively can you save your python-program to a .py file in a texteditor of your choice (atom, sublime, vim etc). Now you have to navigate to the file location via the 'cd' command in your commandline and run the program with the command 'python <your_file_name>.py' On Windows python is not preinstalled and must thus be installed manually. The executable file can be found on the official Python homepage.
24th Jul 2016, 10:01 AM
Tor-Salve Dalsgaard
Tor-Salve Dalsgaard - avatar
0
open terminal, input 'python' or 'python3'
24th Jul 2016, 7:42 AM
王如溱
王如溱 - avatar