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
Post a Comment