Introduction To Python Keywords & Identifiers Variables & Data Types Operators Functions Classes & Objects Loops in Python www.edureka.co OOPs Concepts File Handling
www.edureka.co
OPEN-SOURCE PROCEDURE ORIENTED TONS OF LIBRARIES EASY TO LEARN OBJECT-ORIENTED INTERPRETED
www.edureka.co
COMMENTS IN PYTHON www.edureka.co Print(‘Hello world’) … this is a multi-line comment The difference is uncanny … # this is a single line comment Therearetwotypesofcommentsinpython 1. Singlelinecomment 2. Multilinecomment Commentsinpython
www.edureka.co
Keywordsinpythonarespecialwordsthathaveaspecificmeaning.Andidentifiersareuserdefinednamestorepresent avariable,function,aclassoramodule. KeywordandIdentifiers www.edureka.co
www.edureka.co
WHAT IS A VARIABLE? www.edureka.co
DATA TYPES IN PYTHON www.edureka.co 32 41 NUMBERS STRING LIST TUPLE DICTIONARY 5 6 SET
www.edureka.co
OPERATORS IN PYTHON www.edureka.co Operators Arithmetic Logical Assignment Comparison Bitwise Membership
www.edureka.co
LOOPS IN PYTHON www.edureka.co Why Should We Use One? How Many Types Of Loops? Iterating Over A Sequence?
Why Should We Use Loops? www.edureka.co Suppose you want to print the numbers from 0-10 0,1,2,3,4,5,6,7,8,9,10 You want to print the sum of all even numbers until 100. You want to print the name of all employees in a sequence until you come across lets say ‘Ravi Mehta’ OR OR
www.edureka.co Why FOR Loop? When we are iterating over a sequence. You know the number of times the statements will get executed.
www.edureka.co Why WHILE Loop? When we are executing a set of statements , if the condition holds true. The execution stops as soon as the condition is false.
www.edureka.co
www.edureka.co
www.edureka.co
FUNCTIONS IN PYTHON www.edureka.co HOW TO DECLARE A FUNCTION? 02 01 03 HOW ARE WE GOING TO PASS VALUES IN A FUNCTION? WHY USE FUNCTIONS?
Why Use Functions? www.edureka.co I have to write the logic for Factorial again and again Instead You can define a function to calculate factorial. And you can call that function every time you need to calculate factorial.
www.edureka.co
www.edureka.co
CLASSES & OBJECTS www.edureka.co WHAT IS A CLASS? WHY ARE WE USING THEM? WHAT IS AN OBJECT?
Why Use Classes? www.edureka.co You can define a class with various methods/functions You can access and modify the data stored in methods using the object of the class. A class is basically a definition of an object
www.edureka.co
www.edureka.co
www.edureka.co Abstraction Polymorphism Encapsulation Inheritance
www.edureka.co Creating a parent class Inheriting properties to a derived class or child class Base Class Derived Class You can access methods and properties from either classes by creating the objects.
www.edureka.co A C B C B A Multiple Inheritance Multilevel Inheritance
www.edureka.co
www.edureka.co
www.edureka.co

Introduction To Python | Edureka