Posts

Python tutorial -- #2 (Garbage Collector, Comment, Variables and Datatypes)

Image
Python tutorial GARBAGE COLLECTOR (GC) Module =  A module is a code that can perform an specific task. >>> In Python GC (Garbage Collector) is a module that helps to remove the unwanted things during the execution. When a program execution takes place GC generate a reference count to each object. Reference count means how many times the object execute. when an object has reference count of at least 1 then GC do not removes them but when an object has reference count of 0 then GC understands that object has not any use in program and GC removes them. Python tutorial In the given figure A, B and C are three object. when we execute this program then Python interpreter interprate from A object to B object and then execute C after that it passed to A object. Thus, A, B and C has reference count of 1. So, GC not removes them. COMMENT Observe the given program :- The First line of this program starts with #. This symbol represents comment line . C

Python tutorial -- #1 (Introduction of Python)

Image
Python tutorial (#1) ➦    I INTRODUCTION TO PYTHON All the earlier languages like C, PASCAL, FORTRAN etc. are based on functional aspects of  programming  i.e. writing program through Functions. But programmers faced a lot of difficulties in functional programming. Then computer scientist thought to develop a new way of programming in which we can do programming by linking with real life examples which make programming easier. Thus they developed a new concept of programming called object oriented programming language in which programming were done by using objects and classes. After that JAVA (and other languages also) came and Java becomes the world most popular language. Java is a pure object oriented programming language. Thus, if we write any statements at first we need to define class (due to object orientation). object which do not have any requirement of defining any class also need to define class in Java and it makes the program lengthy and that is the main