execute python code |
Hello friends, welcome to another python programming tutorial, today you will learn how to execute your python code
for python IDLE that comes with installation you can create a new file and write your code and choose run from the menu or press F5 to run it
Python IDLE |
if you prefer using another text editor you can create a new py file and write your code and save it
after you will do the following:
On Windows:
-open cmd from start menu or by pressing at the same time (windows button + R) and write "cmd" then press Enter
windows + r |
- change your actual directory to the directory where py'sfile is, using "cd" commande.
-write in the commande line: yourfilename.py
windows cmd |
On Linux:
-open terminal
- change your actual directory to the directory where py'sfile is, using "cd" commande.
-write in the commande line: python yourfilename.py
run python code on linux (Terminal) |
like that your python code will be executed
thanks
if you did not understood something let me know and write it down
0 comments:
Post a Comment