Skip to main content

Python Programming language: foundations




Python Programming language overview:


  • Python is increasingly becoming a popular programming language as a general programming language as well as applications such as data science, machine learning, and artificial intelligence.
  • Python has gained immense popularity among developers and has ranked 1st on preference by developers across the world.
  • A major reason for its popularity could be the ease of reading and writing syntaxes, English like syntaxes make the programming highly interpretable and implementable.
  • Python's philosophy has been the guiding force for its development and usage 
  • One of the biggest advantages python offers is that it has a vast number of standard modules and libraries that can be used to write clean, efficient, and readable code to deliver and deploy in real-world scenarios faster

Contains:

1) Python syntaxes
2) Data types and values
3) Conditionals statements
4) operators
5) Loops
6) Functions
7) Data structures
8) Classes and objects
9) String objects 
10) IDEs for python


  • We will see the basics of the above topics in writing python scripts and code.

1) Python syntaxes:

  • As we learned python has the English language like syntaxes and easily readable structure:
  • here's very how to print "hello world!" in python     
      > print("hello world!)
      >> hello world!

  • Just as simple as one line to print hello world nothing more than that.

2) Data types and values:

  • Data types and variables are used to define data values and inputs while writing code.
  • when you define a variable it contains some data values that you use in various functionality in executing code.
  • Data types are as follows: 1) string type 2) numerical 3) floating 4) complex 5) boolean

3) Conditionals:

  • Conditional statements help to provide logical statements to values that have been assigned to variables
  • When you want to assign some value X to values in variable Q, you need IF, ELIF and ELSE statements to print or assign value X to a given variable..
  • syntax:  
                       IF condition a;
                              value to be assigned
                       Else:
                               alternative value to be assigned

4) Operators:

  • there are mainly  4 types of operators in the python programming language:
  • 1. Arithmetic operators
  • 2. Bitwise operators
  • 3. comparison operators
  • 4. Boolean operators

5) Loops:

  • Loops are used to iterate over an object or variable with or without specified conditions given:
  • Types of loops in python:
  • 1. For loops
  • 2. While loops

6) Functions:

  • Functions in python help to define objects in python with specific parameters that bring the output of the said function.
  • function needs arguments in python that result in some output.
  • the syntax goes like this: 
  • >def function():
  •           print("Hey, how are you doing")

7) Data structures:

  • data structures help to structure data values in python, it standardizes the input values with a certain data structure that contains some pre-defined properties.
  • types of data structures:
  • 1) List
  • 2) Tuple
  • 3) Set
  • 4) Dictionary
  • 5) Dataframe
  • 6) Array

8) Class and objects in python:

  • Class is defined to create various methods and functions within that class:
  • everything in python is an object and the class itself helps to create multiple objects with similar properties and variables.
  • Class methods help to write short and readable code instead of writing lengthy-long code.
  • def  ClassB: is defining index to write class object.

9) String object:

  • String in python is nothing but the text characters sequence that can contain all data types but it has to be in between double or single quotes to help the python interpreter as a string:
  • some examples:
  • >> x = "Hey! what is your name?"
  • >> y = "Hello!"
  • >> z = 'I;m doing Amazing'


10) IDEs for python:


  • there is a number of IDEs( Integrated development environments) are available to code in python, here I'm sharing some of them:
  • 1) Pycharm community edition
  • 2) Jupyter notebooks
  • 3) Visual basics code
  • 4) IPython
  • 5) Spyder(Anaconda)

That is it for this mini blog, python is much detailed language and I recommend anyone who is reading this blog to go through python's official documentations. 

Learn, practice, write code, and read, that is the only way to learn a programming language.

Cheers!!



Comments

Popular posts from this blog

Introduction to Mathematics and Statistics for Data Science

  Hello and welcome to the Data science lessons blog. to perform any data science task mathematics knowledge and its application will be really important. in fact, it's inevitable in the data science field. Mathematics can be divided into four parts for the Data Science field: 1) Statistics (Descriptive and Inferential): 2) Linear Algebra 3) Probability 4) Optimization  1) Statistics: I cannot imagine data science without this evergreen field of Statistics and its applications across the industries and research fields. basically, statistical methods help us to summerise quantitative data and to get insights out of it. it is not easy to gain any insights by just seeing raw numerical data in any way, until and unless you are a math genius! Topics about Descriptive Statistics: 1) Mean, Median, Mode 2) IQR, percentiles 3) Std deviation and Variance 4) Normal Distribution 5) Z-statistics and T-statistics 6) correlation and linear regression Topics about Inferential Statistics: 1) Sampli

The Ultimate Data Visualization Guide For Beginners

  Hello and welcome to the data science blog site. today I am going to talk about some other sides of the data science field which you might have been aware of or not, that is nothing but 'the arts'. yeah! you heard it right artistic skills are really important to present your data science solutions that you have figured out from data modeling or crunching your data from various sources etc. if you can't present and tell your story to your audience then your solution has no meaning at all. you have to sell your story effectively and visually compellingly way, and that's where data visualization comes into the picture. Here's what we are going to cover: 1) Ideas on visualizations 2) Storytelling 3) Visual display of data 1) Ideas on visualizations: What is data visualizations:   data visualization is nothing but visualizing structured, raw, and numerical data in various forms of charts and graphs to let your audience understand data. that's no big deal, a simple

Introduction to conditional GANs

In this blog, we are going to see Generative adversarial networks (GAN). A generative adversarial network is a class of machine learning frameworks used for training generative models. Generative models create new data instances that resemble the training data. Given a training set, a GAN learns to generate new data with the same statistics as the training set. GANs much depend on the training loss of the model, the model tries to minimize loss to generate as real images as possible. Table of content 1)     What is GAN and How it works? 2)     What is Conditional GAN? 3)     Advantages of cGAN 4)     Pictorial explanation 5)     Use-cases   1)   What is GAN and How it works? GAN is a  generative model which achieves a high level of realism by pairing a generator with a discriminator. The generator learns to produce the target output, while the discriminator learns to distinguish true data from the output o