In this article, we are going to learn about Python programming language from zero to advanced if you are interested in learning Python then follow this blog, we also discuss why we should learn Python and the advantages and disadvantages of Python. let’s begin with the definition of Python.
What is Python? Python history.
python is an interpreted, high-level, general-purpose(multi-purpose) programming language with easy syntax. initially, it was designed by Guido Van Rossan in 1991
let’s understand the meaning of this definition line by line,
interpreted as a translator that is used to translate source code into machine code but it does that line by line.
General purpose means:- python is not specialized to a specific or single domain. it is used in various domains such as,
We see the definition of Python but we also need to know why Python.
Why Python?
- It is open source.
- python has a huge community support.
- it is a cross-platform.
- it has a huge set of libraries and tools.
Feature of python
Advantages and disadvantages of Python
Advantages of Python
- it is open-source & free
- it is platform-independent
- it is a multi-paradigm language
- it is general purpose language
- Python is simple and easy to learn.
Disadvantages of python
- Python is slow compared to Java, c, and C++.
- Python is not a good programming language for mobile development.
- python uses more memory than other programming language
Top 5 programming books for beginners
indentation meaning in python | what is indenting in python?
Indentation:- it is nothing but the leading whitespace before any statement.
The purpose of Indentation in python
- It improves readability.
- helps in indicating a block of code in Python.
python indentation rules
- require a minimum single space to represent an indented statement.
- First-line code can not have an indentation in Python.
- it is mandatory to define a block of code.
- the number of spaces must be uniform.
let’s understand with an example how to indentation in python.
name ='love'
if name =='love':
print('hello my love')
else: without indentation
print('hello baby')
print('how are you?')
name ='love'
if name =='love':
print('hello my love')
else: with indentation
print('hello baby')
print('how are you?')
as we saw how to indent python with the help of a simple example.
The first code of python
print("Hello lovewithcode.com")
REPL in Python | what is repl in python
- REPL is a Python interactive shell.
REPL stands for
- Read – Read the command given by the user.
- Evaluate – python understands your command and processes it.
- Print – then print the output on the screen.
- Loop – again same process.
Conclusion
If you don’t know about Python then don’t worry in this blog I am covering the basic introduction of Python, Python is a very popular language that is used in almost all domains such as Artificial intelligence, Machine learning, web development, and so on…
Frequently Asked Questions About Python
1. what is python?
Ans: Python is a general purpose and high-level programming language.
2. Why Python?
Ans: it is open source, huge community support, a huge library, and cross-platform.
3. Print ‘Hello World’ in python.
Ans: print"Hello World"
4. Type of error in Python.
Ans: There are three types of errors in Python.
- Semantic error(Logical error)
- syntax error
- Run time error
5. What is interpreted?
Ans: An interpreter is a software program written to translate source code to machine code but it does that line-by-line
6. Who developed Python? father of Python.
Ans: Guido Van Rossum in 1991 developed Python.
Read more