Jan 17, 2015

Textual description of firstImageUrl

Python fundamentals - Data types and In-built Objects

In previous section we installed python and run hello world program. Now we will delve into building block of python language and will write sample program to understand the same.
As we know that python is both procedural and object oriented language. We will focus on Object oriented aspect of python.
Python is an object-oriented language and classes form the basis for all data types. Python has various built-In Classes like int for integers , float for floating point values and str for character string. i,e: Every thing in Python is class, even primitive data type.
Consider following statement in python :
    student_cgp  =  7.65
How do we interpret this in python - student_cgp is an identifier and it references a floating point object with value 7.65. Two important point need to be noted here is :
1. Identifiers in python are case-sensitive.In Python, identifier is similar to a reference variable in Java or a pointer variable in C++. Each identifier is implicitly associated with the memory address of the object to which it refers.
2. Unlike Java and C++, python is a dynamically typed language, there is no advance declaration associating an identifier with a particular data type. Although an identifier has no declared type, the object to which it refers has a definite type.
Below is the list of built in class in python. It can be classified broadly mutable and immutable classes. Object of immutable classes cannot be changed subsequently once it has been instantiated.
Commonly used built-in classes for Python
Note : 
1. Bool class instances are expressed as the literals True and False.
2. Numbers are mainly of two types - integers and floats. In Python, int and float classes are the primary numeric types. Default value from constructor int() is 0 and float() is 0.0.
3. In Java and c++, we have different int type based on precision. However,python automatically chooses the internal representation for an integer based upon the magnitude of its value.

Before moving ahead we will execute some code in python interpreter and predict outcome:
    >>> int(3.14)
    >>> int(-3.99)
    >>> int('137')

Operators in python:- 

Almost all operators are present in Python as in other languages, some of them needs special mention are as follows :

Comments in python:-

In python single line comment is done using # (pound).Below code uses # for comment: 
 # I am comment- it will print Hello World
  >>>print 'hello world'
  hello world
Note:  It is recommended not to use triple-quotes for block comments as it is for documentation strings not block comments, although it has a similar effect.Always use # in for single or multiple statements. 

Previous : Introduction and installation                                 Next: Python Control Flow (If-Else, While, For Loop)
Location: Hyderabad, Telangana, India


  1. Replies
    1. I am glad that I saw this post. It is informative blog for us and we need this type of blog thanks for share this blog, Keep posting such instructional blogs and I am looking forward for your future posts. Python Projects for Students Data analytics is the study of dissecting crude data so as to make decisions about that data. Data analytics advances and procedures are generally utilized in business ventures to empower associations to settle on progressively Python Training in Chennai educated business choices. In the present worldwide commercial center, it isn't sufficient to assemble data and do the math; you should realize how to apply that data to genuine situations such that will affect conduct. In the program you will initially gain proficiency with the specialized skills, including R and Python dialects most usually utilized in data analytics programming and usage; Python Training in Chennai at that point center around the commonsense application, in view of genuine business issues in a scope of industry segments, for example, wellbeing, promoting and account. Project Center in Chennai

  2. This comment has been removed by the author.

  3. I am commenting to let you know what a terrific experience my daughter enjoyed reading through your web page. She noticed a wide variety of pieces, with the inclusion of what it is like to have an awesome helping style to have the rest without hassle grasp some grueling matters.
    Surya Informatics

  4. I like your post very much. It is very much useful for my research. I hope you to share more info about this. Keep posting Spark Online Training Hyderabad

  5. Excellent blog with lots of information. I have to thank for this. Do share more.

    Tally Course | Tally Institute

  6. You are doing a great job by sharing useful information about Python Programming course. It is one of the post to read and imporove my knowledge in Python Programming .You can check our Comments In Python language,for more information about Python Comments Tutorial.

  7. Travel Tours To India
    We welcome guests from all over the world and offer them a tailor-made sojourn with our country. Our guests come with expectations and leave with memories of a land, so vibrant and varied. You can choose from a wide array of ready-to-sell packaged tours covering different interests

  8. Best Realtor in Brampton
    We will help you in highly profitable insvestment in which you will let your hard earned money delivers you the best highest return on the investments.

  9. Usually I never comment on blogs but your article is so convincing that I never stop myself to say something about it. You’re doing a great job Man learn Python Online Course

  10. thanks for sharing this is really helpful for my upcoming project

  11. Enjoyed reading the article above, really explains everything in detail, the article is very interesting and effective. Thank you and good luck for the upcoming articles Python Programming Training

  12. Such a very useful article. Very interesting to read this article. I would like to thank you for the efforts you had made for writing this awesome article.
    Data Science Course in Pune
    Data Science Training in Pune

  13. Nice blog. I finally found great post here Very interesting to read this article and very pleased to find this site. Great work!
    Data Science Training in Pune
    Data Science Course in Pune

  14. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    Data Analytics Course in Pune
    Data Analytics Training in Pune

  15. I am impressed by the information that you have on this blog. It shows how well you understand this subject.
    Business Analytics Course in Pune
    Business Analytics Training in Pune

  16. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work!
    Data Science Training Institute in Bangalore

  17. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
    Best Data Science Courses in Bangalore

  18. I feel really happy to have seen your web page and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Data Science Training in Hyderabad | Data Science Course in Hyderabad

  19. You are in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject!
    Business Analytics Training in Hyderabad | Business Analytics Course in Hyderabad

  20. Thumbs up guys your doing a really good job. It is the intent to provide valuable information and best practices, including an understanding of the regulatory process.
    Cyber Security Course in Bangalore

  21. Very nice blog and articles. I am really very happy to visit your blog. Now I am found which I actually want. I check your blog everyday and try to learn something from your blog. Thank you and waiting for your new post.
    Cyber Security Training in Bangalore

  22. After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
    Ethical Hacking Course in Bangalore

  23. Wow! Such an amazing and helpful post this is. I really really love it. I hope that you continue to do your work like this in the future also.
    Ethical Hacking Training in Bangalore

  24. I am impressed by the information that you have on this blog. Thanks for Sharing
    Ethical Hacking in Bangalore

  25. Here at this site really the fastidious material collection so that everybody can enjoy a lot.

    Data Science Course

  26. Your work is very good and I appreciate you and hopping for some more informative posts.

    Data Science Training

  27. I couldn't leave your website until I told you that I really appreciated the high quality information it presents to your visitors. I will come back frequently to check for new posts.

    Data Science Courses

  28. This is an excellent article. Thanks for sharing this information. I will be visiting your blog regularly for the latest articles. I will be visiting your blog regularly to see some of the latest posts.

    Data Science Certification

  29. Fantastic post found to be very impressive to come across such an awesome blog. I really felt enthusiast while reading and enjoyed every bit of your content. Certainly, since this blog is being more informative it is an added advantage for the users who are going through this blog. Once again nice blog keep it up.

    360DigiTMG IoT Course

  30. Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such an amazing content for all the curious readers who are very keen of being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in future too.

    360DigiTMG Artificial Intelligence Course

  31. It would also motivate almost everyone to save this webpage for their favorite helper to help get the look published.

    Business Analytics Course in Bangalore

  32. I want to thank you for your time in this wonderful read! I really appreciate every moment and I put you in your favorites to see new things on your blog, a must-have blog!

    Data Analytics Course in Bangalore

  33. I am very enjoying to read your well-written article posts. It seems that you devote a great deal of hard work and time onto your own blog. typeerror nonetype object is not subscriptable

  34. Terrific post thoroughly enjoyed reading the blog and more over found to be the tremendous one. In fact, educating the participants with it's amazing content. Hope you share the similar content consecutively.

    artificial intelligence course in bhilai

  35. Speaking honestly this blog is absolutely amazing in learning the subject that is building up the knowledge of every individual and enlarging to develop the skills which can be applied in to practical one. Finally, thanking the blogger to launch more further too.

    Data Science training in Bhilai

  36. Stupendous blog huge applause to the blogger and hoping you to come up with such an extraordinary content in future. Surely, this post will inspire many aspirants who are very keen in gaining the knowledge. Expecting many more contents with lot more curiosity further.

    Digital Marketing Course in Bhilai