You will have to setup python (the version you want ) from the official website:
https://www.python.org
and use any text editor I suggest atom :
https://atom.io
Then type your code in it and after that save your file with this extension (filename.py) go to it's directory and open powershell or terminal there just type this in the terminal: python filename.py