How to Run Python Programs | Video Tutorial


Hello guys and welcome to python programming
tutorials by amuls academy. Today in this class we are discussing about
how to run programs in python programming language. There are three ways one is using python command
line second one is using microsoft command prompt and third one is using python idle. First we will see how to run programs using
python command line.To use python command line goto start and search for python and
click on python 3.5. This is our python command line screen in
the top we can see python 3.5.1 it is our python version and we can type “help” “copyright”
“credits” or “license” for more information. Here we can see three greater symbol with
blinking cursor it indicates that we are in interactive mode that means if we write any
querry here,here itself we will get output for that. In this class i’m taking one programming example
just to explain how to run programs don’t worry about the code right now. Lets begin with the code and i will write
one greeting message and press enter we can see the output. This is the one way where you can type your
code in ineractive mode and there itself you will get output for that.Second way is using
microsoft command prompt.So close this and open the command prompt. This is the command prompt screen.If you remember
in the previous class while installing python there was one option that is “adding path”if
you already added the path then here you just need mention python and press enter you can
use python here. If you didn’t select that option then you
need mention the whole path for python here then only you can use python in command prompt.okey
now we are in interactive mode we can type our code and we can check.and press enter
we can see the output. Here we wrote our code in interactive mode
there is an another way where you can type your code in a file and you can save that
and you can exicute that file whenever you want.That is called as script mode. To write the code in a file we need use one
editor. I will use notepad.Here
we can type our code.We need to save this file for that goto file and save or you can
press ctrl+S in your keyboard. i will save my file in desktop and we need
to give file name i will give first.py. py is extention for python files.go for save. To exicute this file we need to go back to
command prompt.So close this and in command prompt just enter exit(). Now to exicute that file we need change the
directory because we saved our file in desktop.So use cd command change directory and type cd
desktop and press enter. Now you can exicute your file, just type python
filename and press enter.and we can see the output.This is the second method to run python
program,third method is using python idle. close this. type idle in search and click on idle,this
is our python shell,in the top we can see python 3.5.1. and we can type “copyright”
“credits” or “license()” for more information and now we are in interactive mode we can
type our code in interactive mode and press enter you can see the output. Here also you can type youe code in file and
exicute that whenever you want for that goto file newfile or press ctrl+N.Here you acn
type your code and we need to save this file.goto file and save or ctrl+S in your keyboard.i
will save this file in desktop.we need to give name to file i will give second.py and
goto save. To run this file goto run and run module and
we can see the output in shell. This is about how to run programs using this
three methods.Thats it for now thank you for watching i will meet you in next class till
then take care.

30 thoughts on “How to Run Python Programs | Video Tutorial

  1. i instal pythan 3.6.5 (32bit) laptop but not instal. show msg. ples update your machine. windows 7 service pac1 required. what i do? i use crack windows7.

  2. It says "invalid syntax" whenever i give any command. I installed properly but I can't find IDLE as well.

  3. Hi,

    what is the difference between Python Command line and Python IDLE ? at the end both are interactive mode and showing the output over there itself. can you please help me out on this ?

    Thanks

  4. Just now , I started watching videos and hoping that i will get gud idea on python after seeing these videos . Keep doing and All The Best

  5. In command prompt I got cant open file 'first.py':[Erin 2]no such file or directory what I have to do mam

  6. Does this Python software work the same for Apple computers?

    Edit : Are those three method of coding available in Apple computers?

Leave a Reply

Your email address will not be published. Required fields are marked *