Skip to main content

Why python ? What is Python?

Python is a generally interpreted and interactive dynamic symmetric  high-level object oriented programming language. It is widely used in Machine Learning today. Pretty easy to understand, learn, code and explain because it has very crisp and clear syntaxes than other languages. 

Guido van Rossum made Python in 1991, named his programming language after the television show Monty Python's Flying Circus. Python has got features or derived features from ABC named programming language.

Interactive - The result will be printed on the screen, immediately return, in the next line as we entered.

High-level - Humans can easy to interpret; the source code contains easy-to-read syntax that is later converted into a low-level language (0 , 1)

Dynamic-symmetric – Don’t need to clarify the data type. It Allows the type casting.

Type Casting –  We can transform the one data type in another data type

Object Oriented language is focused on Objects which are created using Class. OOP mainly used to binding the data and functions that operate on and no other type of code can access this data. All in python language are objects. Keyword – DRY (Don’t Repeat Yourself)

·       Why should use OOPS : for saving time and effort

Class can be described as an object's blueprint for creating multiple different objects.

Object –  Instance of class; it has attributes and behavior. take water as an example of object. It has weight, color, fluidity are its definite attributes. And apparently it has behavior like flowing, boiling, freezing etc. These are same things the behaviors of object are called method in object oriented programming language.

       Object-oriented programming is based on the following:

Encapsulation - The state of each object are privately held inside a class. Other objects do not have access to this class.

Abstraction - use for hiding any unnecessary implementation code and helps developers more easily make changes and additions over time.

Inheritance – A class which inherits the properties of another class

Polymorphism - Objects can take on more than one form depending on the context. Child class can be given same name as Parent class.


Here some of the features of Python are

a) It is an open source programming language
b) Interpreted Language.
c) More expressive so that is simple and easy to learn, read and execute the syntax
d) developing desktop GUI applications website and web applications,
e) Provide the large Standard Library.
f) Directly runs from the source code. Not need to compile.


Why python is the best choice for Web based Programming today?


Today we have more data and processing power than before. Until today we have created 100 Exabytes of data via social mediums so yes the  Python is best choice for Web based Programming because of its great features. like it is easiest to learn, read and fastest workflow with much lesser coding, The main reason is it integrates easily with other languages just like Java, C++, or C and it is open source, freely available, and quite stable. Its standard library support enables to execute a lot of complex functionalities easily. Its provide the security and large advanced library


Why python is called interpreted language?

 Python is called an interpreted language because it goes through an interpreter called PVM (Python Virtual Machine), which converts the written code line by line direct into the machine code language which direct understood by computer's processor. As we don't need to compile codes by own self. 

Comments

Popular posts from this blog

Python program to check if variable is of integer or string

Let's say if you want to input something of any datatype and want to get datatype only of it. So... Whenever you input some data whether it is string, integer or float like this: i = input('enter something here: ') means without int, str or float put before the syntax, that time your given input is always consider as string  or if you make it like this to add int before syntax; i = int(input('enter something here: '))  it always consider as integer and gives value error when you input string and same thing happens with float, So here is a program to solve this problem of input and get datatype var = input('input to check if variable is of integer or string: ') if var.isdigit() == False:     print(type(var)) else:     var1 = int(var)     print(type(var1))

Multiple classification from many of directories

  # %%  Import nessacary libraries import  numpy  as  np import  pandas  as  pd import  cv2 import  matplotlib.pyplot  as  plt import  os import  glob # %%   Keras Tensorflow libraries from  keras  import  layers from  keras.models  import  Model from  keras.optimizers  import  RMSprop , Adam , Nadam from  keras.preprocessing.image  import  ImageDataGenerator from  keras.layers  import  Input, BatchNormalization, Dense, Dropout, Conv2D, Flatten, GlobalAveragePooling2D, LeakyReLU from  keras.preprocessing.image  import  ImageDataGenerator, img_to_array, load_img # %%  Path path  =   r 'G:/Machine Learning/Project/Lego Mnifigures Classification/dataset' open_dir  =  os....

Digit Recognition

Here you can import digit dataset from scikit learn library which is in-built, So you don't need to download from other else Note: If you use visual code, I recommend you to turn your color theme to Monokai because it has a few extra and important keyword and attractive colors than other theme.   # %%  Import libraries import  numpy  as  np import  pandas  as  pd import  matplotlib.pyplot  as  plt import  random  # %%   Load dataset from  sklearn.datasets  import  load_digits dataset  =  load_digits() dataset.keys() output: d ict_keys(['data', 'target', 'target_names', 'images', 'DESCR']) You have to check all to direct print them Here DESCR is a description of dataset # %%   divide the dataset into input and target inputs  =  dataset.data target  =  dataset.target # %% ...