For Quiz Preparation for TGES ,Go to General Knowledge Section

Thursday, November 17

Python for beginners , and its some examples.

 








   What is Python ?

                   Python programming language was developed by Guido Van Rossum in February 1991.

Python is easy to learn yet powerful object oriented programming language . It is a very high level programing language yet as powerful as many other middle- Level not so high -level language like C, C+ Java etc. 

Some Plauses of Python are :

Easy to use 
Object Oriented
Expressive Language
Interpreter Language
It's Completeness
Cross-platfrom Language
Free and Open Source
Variety of Usage /Application 

Minus of Python are : 

Not the fastest language
Lesser Libraries than C,Java,Perl 
Not Strong on Type-binding 
Not Easily Convertible 



Note:-  This language has two different ways to work 
1.    in Interactive Mode
2.    in Script Mode 


Interactive mode :-
 If want to print some program of only one lines so we can open software Python IDLE and start typing our one line program and then press enter .So our output in our screen 

Like 
1st Program 

>>> 2+5
>> 7

2nd Program 

print ( " Ram is good boy.") 
Output:- Ram is good boy. 

Working with Script mode 

* If we work more lines code so we have to work with Script mode  so we have to open our software 
Python IDLE  and click on File and Then Click on New  and We can see a notepad for our code to type . 
Then we type all our code and click on SAVE  and save our file with .py   file extension . 
Like Gopalsgk.py
 


What are the Token in Pythons ?
    ** The smallest individual unit in a program is known as a Token or a lexical unit.
Python has following tokens are 
    i) Keywords                 ii) identifiers (Name )
    iii) Literals                    iv) Operators 
    v) Punctuators 

Keywords  
             Keywords are the words that convey a special meaning to the language compiler /Interpreter . 
        These are reserved for special purpose and must not be used as normal identifier names .

Pythons programming language has some following keywords   
            False         assert                 del            for            in            or            white

             None         break                 elif            from           is        pass            with

            True         class                else               global        lambda            raise         yield 

            and            continue        expert             if                nonlocal            return            

            as                def                finally          import        import         not   try 
     



No comments:
Write Comments

Please ask any question about gk related

Total Pageviews

Popular Posts

© 2014 SSC GK.in . Designed by Bloggertheme9 | Distributed By Gooyaabi Templates
Powered by Blogger.