FIFA-2022 Career Guide Free Tutorials Go to Your University Placement Preparation 
2 like 0 dislike
10.1k views
in Python Programming by Goeduhub's Expert (3.1k points)
edited by

What is Python ? and its basic introduction- History, Characteristics & Applications. Python syntax, Comments in python, Variables, Python Keywords, Python Operators and Data Types in Python.

In this article you will find  the answer of questions such as;  Why python is getting popular what make python better programing language then others.

Related Links: Basic Python 

by (563 points)
Today I have learnt about Introduction of python, its history, its characteristics, relatedness to oops, its applications and the basic syntax of python, keywords, operator. Thank you
by (100 points)
Python is a general purpose, dynamic, high level, and interpreted programming language. It supports Object Oriented programming approach to develop applications. I learned about it's history,its characteristics, relatedness to oops, its applications and the basic syntax of python, keywords, operator in this module.

7 Answers

2 like 2 dislike
by Goeduhub's Expert (3.1k points)
edited by
 
Best answer

Python

Python is a general purpose, dynamic, high level, and interpreted programming language. It supports Object Oriented programming approach to develop applications.

  • general-purpose
  • Interpreted
  • Object Oriented language

History

Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum and first released in 1991.Python 2.0, released in 2000, introduced features like list comprehensions and a garbage collection system capable of collecting reference cycles. Python 3.0, released in 2008, was a major revision of the language that is not completely backward-compatible, and much Python 2 code does not run unmodified on Python 3.

Characteristics:-

1.Easy to learn  

  • Simple structure, Easy Key words and cleared defined syntax make it easy and attract students

2.Free and open source 

3.Object oriented 

  •  Python supports both procedure-oriented and object-oriented programming which is one of the key python features. It also supports multiple inheritances.

4.Portable  

  • Python run equally on different platforms like windows, Linux,Unix etc

5.Expressive language

  •  Python codes simple it makes them more readable and understandable 

6.Interpreted  

  • Interpreted read and executes code line by line this makes debugging easy

7.Extensible

  • You can  write some of your python code in other languages like C++ , it makes python  more extendable to other fields.  

8.Integrated 

  • It can be easily integrated with languages like C, C++,Java.

9.GUI programming 

  • Python offers various libraries for making graphical user interface.

10.Large standard library 

  • Python downloads with a large library that you can use so you don’t have to write your own code for every single thing.

Applications:-

1.Web Applications

  • We can use Python to develop web applications.It also provides Frameworks such as Django, Pyramid to design and develop web applications.

2.Machine Learning

  • Different applications can be implemented in machine learning using python.

3.Scientific computing

  • Some libraries like Scipy , Pandas are full package of engineering and mathematics

4.Business applications

  • OpenErp, Tryton, Picalo are good example of python business applications.

5.Games and 3D graphics

  • PyGame library for games and  GUI library to develop user interface in python based application. 

6.Desktop applications 

  • You tube, drop box, bit torrent, bazaar, and cinema 4D are the desktop applications which are developed in python.

Some Real Life Applications in python

Netflix, Facebook , Google etc.

Getting started with python 

Python syntax-

  • Python code is shorter than that written in other.
  • In Python, there is no need to declare variable.
  • In Python, a function may accept an argument of any type, and return a value of any type.

Example  (In C )

#include <stdio.h>

int main()

{

printf("Hello world, Python training in jaipur");

return 0;

}

Output 

Hello word, Python training in jaipur  

Example  (In python )

print (“Hello World, Python training in jaipur”)

Output 

Hello world, Python training in jaipur  

Note:- As you can see python code is shorter than C code, its like English syntax.It make python more easy to learn

Comments in python-

# single line python statement 

multi line line comment 

''' Goeduhub technologies is 

best institute to provide python training in jaipur.'''

Note:-Comment start with (""" or ''') and end with (""" or ''' )

Variables- Variables are nothing but reserved memory locations to store values. This means that when you create a variable you reserve some space in memory.

A=20

B="Goeduhub"

print(A,B) # print () to show the result

#Assigning single value to multiple variables

x=y=z=50

print (x)

print (y)

print (z)

#Assigning multiple values to multiple variables

a,b,c=1,2,3

Output

20 Goeduhub


50 50 50 


1 2 3

Note:- A variable name can't start with a number, it must start with underscore(_) or any alphabets. A variable name is case sensitive and contain only alphabets, digits and underscore.

  • No need to declare variables  before using them.

Python Keywords

TrueFalseNoneandas
assetdefclasscontinuebreak
elsefinallyelifdelexcept
globalforiffromimport
raisetryorreturnpass
nonlocalin notislambda

 Note:-We can't use python keywords as a variable name or identifiers name.

Python operators

  • Arithmetic operators
  • Assignment operators
  • Comparison operators
  • Logical operators
  • Identity operators
  • Membership operators
  • Bitwise operators

Arithmetic operators

Operators Explanation 
Addition (+ )Adds values on either side of the operator
Subtraction (-)Subtracts the right hand operator with left hand operator
Multiplication (*)Multiplies values on either side of the operator
Division (/)Divides left hand operand with right hand operator
Modulus (%)Divides left hand operand by right hand operand and returns remainder
Exponent (**)Performs exponential (power) calculation on operators

Example

a = 21

b = 10

c = 0

c = a + b

print ( c )

c = a - b

print ( c )

c = a * b

print ( c )

c = a / b

print ( c )

c = a % b

print ( c )

a = 2

b = 3

c = a**b

print ( c )

Output

31 11 210 2.1 1 8
 

Assignment operators

Operators Description
equals toAssigns values from right side operands to left side operand
+= Add ANDIt adds right operand to the left operand and assign the result to left operand 

Note:- Like addition we can use all  arithmetic operation with assignment operators

Example

a = 21

b = 10

c = 0

c = a + b

print ( c )

c += a

print ( c )

c *= a

print ( c )

c /= a

print ( c )

c = 2

c %= a

print ( c )

c **= a

print ( c )

Output

31 


52


 1092 


52.0


 


2097152

Comparison operator

OperatorsDescription 
>True if left operand is greater than the right 
<True if left operand is less than the right 
==True if left operand is equal to right 
!=True if left operand is not equal to right 

Example

a = 21

b = 10

d=10

if ( b== d ):

print ("b is equal to d")

else:

print ("a is not equal to b")

if ( a != b ):

print ("a is not equal to b")

else:

print ("a is equal to b")

if ( a < b ): print ("a is less than b")

else: print ("a is not less than b")

if ( a > b ):

print ("a is greater than b")

else:

print ("a is not greater than b")

 Output

b is equal to d


 a is not equal to b


 a is not less than b


a is greater than b

Note:- You will learn if and else conditions further in this tutorial.

Logical operators

Operators Description
and If all conditions are true than gives: True
or If any condition is true than gives: True 
notUsed to reserve logical state of its operands 

Example

x = True

y = False

print('x and y is',x and y)

print('x or y is',x or y)

print('not x is',not x)

Output

x and y is False x or y is True not x is False

Membership operators

OperatorsDescription
in Display True value if value is in  the given sequence or expression
in notDisplay True value if value is not in the given sequence or expression

Example

X = [1, 2, 3, 4]

A = 3

print(A in X)

print(A not in X)

Output

True 

False 

Identity operator

OperatorsDescription
isIt is evaluated to be true if the reference present at both sides point to the same object.
is not It is evaluated to be true if the reference present at both sides point to the different  object.

Example

X1 = 'Welcome To Goeduhub!'

X2 = 1234

Y1 = 'Welcome To Goeduhub!'

Y2 = 1234

print(X1 is Y1)

print(X1 is not Y1)

print(X1 is not Y2)

print(X1 is X2)

Output

False 


True 


True 


False 

Identity Operator Example

A=20
B="Goeduhub"
C=20
print(A,B,C) # print () to show the result
print(id(A))  #here it will give address of 20 object which is refered by A
print(id(B))  #here it will give address of "Goeduhub" object is refered by B
print(id(C)) #here it will give address of 20 object is refered by C

print(A is C) # here we can say both refrences to same object True
print(A is B) #False

Bitwise operator

Bitwise operator work on bits and perform bit by bit operation operands.

Operators Description 
a|b Perform OR operation on each operands 
a&bPerform AND operation on each operands
a^bThe resulting bit will be 1 if both the bits are different otherwise the resulting bit will be 0.
a>>bShift a right by b bits
a<<bShift a left by b bits
~(Negation)It calculate negation of each operand. Like 1 is taken as 0.

Example

a = 58 # 111010

b = 13 # 1101

c = 0

c = a & b

print ( c ) # 8 = 1000

c = a | b

print ( c ) # 63 = 111111

c = a ^ b

print ( c ) # 55 = 110111

c = a << 2

print ( c ) # 232 = 11101000

c = a >> 2

print ( c ) # 14 = 1110

Output 


63


 55 


232


 14 

Types of Data Types in Python

  • In python we have  type() function to find out type of value passed in variable.

Example

a=10  

b="Goeduhub technologies is best python institute in jaipur rajasthan"  

c = 10.5  

print(type(a))   

print(type(b))  

type(c)

Output 

<class 'int'>
<class 'str'>
float

 Python Data types divided into two parts

1.Immutable  (Unable to change, you cannot add or remove the value )

2.Mutable (Liable to change , you can add or remove the values )

Immutable                                                        Mutable

  • Numbers                                                    Lists
  • Strings                                                        Dictionaries
  • Tuple                                                          Sets

Python Tutorial 

Machine Learning Tutorial 

by (412 points)
is there any method in python to find all reserved keyword of python
by Goeduhub's Expert (2.2k points)
Yes, we can find list of all reserved keywords in Python using below code:
keyword - Testing  Package for Python keywords,
import keyword
print(keyword.kwlist)

Here you can see keyword is a inbuilt package in Python.
https://docs.python.org/3/library/keyword.html#module-keyword
by (100 points)
Why is every variable refered to class not datatype??
by Goeduhub's Expert (2.2k points)
Python programming, data types are actually classes and variables are instance (object) of these classes.  That's why  type() function is referred class of datatype.
by (412 points)
thank you mam.
by (454 points)
please conform me there are 33 keyword in python. when I print using (keyword.kwlist), it print 33 keyword.
by Goeduhub's Expert (2.2k points)
Yes, Python 3.6 have 33 keywords only.
by (101 points)
good content
by (294 points)
in python we do not require the data type of variable
so tell me what method that how it find data type of variable
by (412 points)
Why is every variable reffered to class not datatype?
by Goeduhub's Expert (2.2k points)
@Namrata Patil , I have already answered this question, see in upper comments.
Again- Python programming, data types are actually classes and variables are instance (object) of these classes.  That's why  type() function is referred class of datatype.
by Goeduhub's Expert (2.2k points)
@Shobhit Kumar , We can find data type using type() function.
example- a=10
print(type(a))
by (294 points)
Today ,I study basic of python ,I learn so much about python like operators, characteristic ,  syntax and  data types . your content of basic python is very helpful for me thank you for such a wonderful content.
by (102 points)
Today ,I study basic of python ,I learn so much about python like history of python ,operators, characteristic ,  syntax and  data types . your content of basic python is very helpful for me thank you for such a wonderful content.
by (104 points)
Today i study basic introduction of python then i learn about some topic like that python characteristics,applications,python syntax,keyword,operators and data types. python is so simple to understand compare to others language .
by (232 points)
@Rahul malviya                                                                                                   Python Basics
today i learn what is python, history of python,use of python then i learn about some topic like that python characteristics,applications,python syntax,keyword,operators and data types.
by (113 points)
Today ,I study basic of python
by (454 points)
how to check memory address of a variable? it is necessary for "is" and "immutable"
by (332 points)
Today, I  study basic introduction of python where i learnt some topic like th python characteristics,applications,python syntax,keyword,operators and data types with good method.
by (134 points)
firstly.i learned about the python language and the mutable and immutable.i learned about the operator in python like Add,Subtract,multiply,divide.and i learned about the charactersticis ,syntax,indentation,keywords,data types.
by (435 points)
@Tarun Udainiya ,today, i was learn about python basics like if-else statement, loop, different types of data types .
by (103 points)
Today i learn about basic principles of the python and diffrent types of operators in python
by (262 points)
Today i learnt basics of python .Basically it included the building blocks of python.
by (302 points)
I have a doubt, I have read that python takes every input as a string.
Then how 10(for ex.) is type() as integer??
by (134 points)
maam m comment krke question nhi puch pata hu maam mere m ask question ka option nhi ho raha h m.maam please help me.
by Goeduhub's Expert (9.3k points)
@aman ......Just like this comment, you can ask your question in same way....
by (134 points)
Then typecast for the convert the string to integer using type(). For e. X. a=10 then type(a) then int type
by (182 points)
mam mujhe identity operator nhi smj aaya......
by Goeduhub's Expert (2.2k points)
@shivani gahlot---Identity Operators
A=20
B="Goeduhub"
C=20
print(A,B,C) # print () to show the result
print(id(A))  #here it will give address of 20 object which is refered by A
print(id(B))  #here it will give address of "Goeduhub" object is refered by B
print(id(C)) #here it will give address of 20 object is refered by C

print(A is C) # here we can say both refrences to same object True
print(A is B) #False
by Goeduhub's Expert (2.2k points)
@ Swati "how to check memory address of a variable? it is necessary for "is" and "immutable""
To check memory  address of a variable in python , we need to use id() function.
Example- a=10
print(id(a))  # this will give address of 10 object
We can check , it is not necessary.
by (100 points)
In this article, I learn about python language history like who developed it, what the different versions of python till now, about it's applications, characteristics, variables, operators, datatypes, keywords.
by (102 points)
nice thanks to such simplified notes
by (102 points)
learned data type and about python operators..easy to understand
by (106 points)
Try the following codes, I can see the keyword module has 35 items in the list.

List = keyword.kwlist
print(List)
print('Total number of keyword in the list:',len(List))
by (101 points)
yes you can find keyword list in python using help() mode
type help() command on terminal and then type keyword and show the 35 keyword list on screen
0 like 0 dislike
by (182 points)
Today i study basic introduction of python then i learn about some topic like that python characteristics,applications,python syntax,keyword,operators and data types.
0 like 0 dislike
by (142 points)

Module 1:   

Basics of Python

 In this module, I have learnt about Introduction of python, its characteristics  and its applications the basic syntax of python. I have also learnt about commands (single line comment and multi line comment).Also learnt about variable and basic rules of naming a variable. Then learnt about python keywords and then operators such as (Arithmetic, Assignment, Logical, Bit-wise, Comparison, Identity, Membership operators). I have learnt about different Datatypes in python (Immutable and Mutable) .

by (614 points)
Today I learn about python language and its basic knowledge .
I learn about the characteristics and it's application.
0 like 0 dislike
by (142 points)

Module 1: 

                    Basics of Python

In this module I have learnt about Introduction of python, its characteristics, its applications. and the basic syntax of python. I have also learnt about commands (single line comment and multi line comment).Also learnt about variable and basic rules of naming a variable. Then learnt about python keywords and then operators such as (Arithmetic, Assignment, Logical, Bit-wise, Comparison, Identity, Membership operators). I have learnt about different Datatypes in python (Immutable and Mutable) .

by (614 points)
Today i learn what is python, history of python.
 python syntax,keyword,operators and data types.
by (123 points)
21-04-2020,
I learn Python's syntax , operators, keywords and data types. This content is very helpful.
0 like 0 dislike
by (391 points)
Date: 21/04/2020

Topic: Python Basic Introduction

Today, i have learn how and where python can be use, what is their available operators within we can do everything by using it.
by (135 points)
Python is basically used in web application, and object oriented programming is one of the python features.
by (135 points)
Today I learn basic introduction of python, history,python characteristics, applications , python syntax, keywords , operators, variables and data types
0 like 0 dislike
by (294 points)
int this chapter i learned the basic of python
0 like 0 dislike
by (112 points)
In this module, I have learnt the basic introduction required to get started with python. I have learnt the characteristics of python, various operators, python keywords, it's applications and about a few general concepts like mutable,immutable and type function.

Learn & Improve In-Demand Data Skills Online in this Summer With  These High Quality Courses[Recommended by GOEDUHUB]:-

Best Data Science Online Courses[Lists] on:-

Claim your 10 Days FREE Trial for Pluralsight.

Best Data Science Courses on Datacamp
Best Data Science Courses on Coursera
Best Data Science Courses on Udemy
Best Data Science Courses on Pluralsight
Best Data Science Courses & Microdegrees on Udacity
Best Artificial Intelligence[AI] Courses on Coursera
Best Machine Learning[ML] Courses on Coursera
Best Python Programming Courses on Coursera
Best Artificial Intelligence[AI] Courses on Udemy
Best Python Programming Courses on Udemy

Related questions

2 like 0 dislike
4 answers 4.0k views
asked Dec 21, 2019 in Python Programming by Nisha Goeduhub's Expert (3.1k points)
0 like 0 dislike
5 answers 2.5k views
1 like 0 dislike
3 answers 2.8k views
0 like 0 dislike
4 answers 2.5k views

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy ||  Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory

...