In this article, We are going to perform Python Introduction for Programmers, What is Python, Python Features, How to Install Python on Windows 10, Python Indentation and Types of Comments in Python
Table of Contents
What is Python?
Python is a high-level programming language which is
- Interpreted :- Python is process at runtime by the interpreter.
- Interactive :- You can use a python prompt & interact with the interpreter directly to write your program.
- Object-oriented :- Python supports Object-oriented technique of programming.
- python is a great language for the beginner-level programmers & supports the development of a wide range of applications.
Python Features:-
- Easy to learn, easy to read & easy to maintain.
- Portable :- It can run on various hardware platform & has the same interface on all platform.
- Extensible :- You can add low-level modules to the python interpreter.
- Scalable :- Python provides a good structure and support for large programs.
- Python has support for an interactive mode of testing and debugging.
- Everything in python is an object.
How to Install Python on Windows 10
Step 1: Select version of python to install. You can download for free from Python official site.
Step 2: Open command prompt and type python –version to check the version you have install.
Step 3: Go to IDLE > File > New then save file with .py extension for eg. Welcome.py
Step 4: write code in file and save.
Step 5: Then go to Run > Run Module or simply press F5 to run.
Python Introduction for Programmers
Python Indentation
- Indentation means the space from margin to the begin of characters in a line.
- Most of the programming languages are use brace { } to define block of code. Python uses indentation.
- A code of block (body,loop,etc) starts with indentation and ends with the first unindented line. The block of indentation is up to you.
- Generally, whitespace is used for indentation.
- For eg,
if True:
print "True"
else:
print "False"
Python comments
A comments is text that doesn’t affect on code, it just text to let someone to understand your code what you have done in program. It helpful when you want to change in your program or solve errors. And when you read comment then you can understand the purpose of code. Comments are useful to understand your code when you are no longer to use it.
Types of Comments in Python
- Single line comment
- Multiple line comment
Single line comment
Python single line comment start with # (hashtag) special character with no white spaces and last till the end of line.
Example:
#this is comment
Print(“welcome to Foss TechNix”)
Multiple line comment
In Python for multipla line comment we can use three double quotes or three single quotes (‘’’) at the beginning and at the end of the comments.
Example:
‘’’
This is
Multiline
Comment
‘’’
Print(“welcome”)
We have covered, Python Introduction for Programmers.
Conclusion:
We have covered, Python Introduction for Programmers, What is Python, Python Features, How to Install Python on Windows 10, Python Indentation and Types of Comments in Python
Related Articles:
Python Conditional Statements with Examples
Good work!
Thanks for your comment.
Great job dr
Thanks for your comment.
Great job
Thanks for your comment.
Great job dear
Thanks for your comment.
Good job
Our blessing r with u
Thanks for your comment.
Good job👍
Thanks for your comment.
Great share
Thanks for your comment.