YouTube Link: https://youtu.be/6yrsX752CWk
(** Python Certification Training: https://www.edureka.co/python **)
This Edureka PPT on 'Variables and Data Types in Python' will help you establish a foothold on Python by helping you learn basic concepts like variables and data types. Below are the topics covered in this PPT:
Introduction To Python
Applications Of Python
Variable Declaration
Variable Data Types
Type Conversion
Python Tutorial Playlist: https://goo.gl/WsBpKe
Blog Series: http://bit.ly/2sqmP4s
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
4. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Introduction to Python
Python is a high-level interpreted, Object oriented programming language, popular for its readability and
clear syntax.
Procedure
Oriented
Object
Oriented
Easy to
learn
High level
language
6. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Introduction to Python
Python was named after British comedy
group ‘MONTY PYTHON’.
GUIDO VAN ROSSUM
8. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Applications Of Python Programming Language
Server side Web
Development
Prototyping
Big data
Scripting
Software Development
Databases
10. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Variable Declaration and Definition
Variable Declaration
Variable Definition
Variable
11. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Variable Definition and Declaration
Examples
Variable Declaration
Variable
Variable is created as soon as you assign a value to it. It does not
need any commands unlike other programming languages.
12. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Variable Definition and Declaration
Examples
Variable
Variable Declaration
x = 100
y = “Edureka”
Print(x)
Print(y)
13. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Variable Definition and Declaration
Variable Declaration
Variable
Examples
x = 100
y = 200
print(x * y)
print(x – y)
print(x % y)
16. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBERS
STRING
SET
integer:
x = 10
float:
x = 10.234
Complex:
x = 25j
17. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBER
STRING
SET
x = ‘hello’
y = “world”
z = input()
print(“here is an example”, x, y, z)
18. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBER
STRING
SET
Example:
Fruits = [‘apple’, ‘kiwi’, ‘banana’]
print(Fruits)
Ordered, can be changed. Duplicate entries are present.
19. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBER
STRING
SET
Example:
animals = { ‘reptiles’: ‘snake’,
‘mammals’ : ‘whale’,
‘amphibians’ : ‘frogs’
}
print(animals)
Unordered, can be changed. NO Duplicate entries are present.
20. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBER
STRING
SET
Example:
animals = (‘lion’, ‘tiger’, ‘monkey’)
print(animals)
Ordered, cannot be changed. Duplicate entries are present.
21. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Data Types
DICTIONARY
LIST
TUPLE
NUMBER
STRING
SET
Example:
animals = {“lion”, “monkey”, “snake”}
print(animals)
Unordered, No Duplicate entries are present.
23. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Type Conversion
x = (20)
y = (“number is”)
z = 20
Print( str(x * z) , y )
Type conversion specifies a type
to a variable.
24. PYTHON CERTIFICATION TRAINING www.edureka.co/python
Type Conversion
1. int() – This function changes any data type to integer data type.
2. float() – This function changes any data type to float data type.
3. tuple() – This function changes any data type to tuple.
4. list() – This function changes any data type to a List.
5. set() – This function changes any data type to a Set.
6. dict() – This function changes any data type to a dictionary.