Python Introduction for Programmers [Part 1]

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

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 [Part 1] 1

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

  1. Single line comment
  2. 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”)
Python Introduction for Programmers [Part 1] 2

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

Python operators with Examples

Loops in Python with Examples

Shweta Mamidwar

I am Shweta Mamidwar working as a Intern in Product Company. Likes to share knowledge.

14 thoughts on “Python Introduction for Programmers [Part 1]”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap