Sayantan's Blog On Python Programming

Month: December 2022

PYTHON STRING MANIPULATION

PYTHON STRING MANIPULATION PYTHON STRING VARIABLES Variables are the container that store sting values. Actually it is a name given to a memory location where the string value is stored .The advantage of using a variable is if we change the value stored in the variable then it will change all the dependent values where …

PYTHON STRING MANIPULATION Read More »

PYTHON RELATIONAL OPERATORS

PYTHON RELATIONAL OPERATOR GREATER THAN OPERATOR (>): GREATER THAN operator compare two numbers and return TRUE if the first number is greater than the second number. Otherwise it will return FALSE.So the result is always a Boolean value. INTEGER: PYTHON RELATIONAL OPERATORS : Output PYTHON RELATIONAL OPERATORS : Output FLOATING: PYTHON RELATIONAL OPERATORS : Output …

PYTHON RELATIONAL OPERATORS Read More »

PYTHON FLOATING POINT NUMBERS

PYTHON FLOATING POINT NUMBERS INTRODUCTION: Floating point numbers are also working the similar way like Integer. They only have the decimal part. WORKING WITH FLOATING VARIABLES: Simple adding using variables: PYTHON FLOATING POINT NUMBERS : Output In the above example we have simply put two floating number into two variables a and b. Then calculate …

PYTHON FLOATING POINT NUMBERS Read More »

INTRODUCTION TO PYTHON STRINGS

INTRODUCTION TO PYTHON STRINGS INTRODUCTION STRING in PYTHON are sequence of characters. Strings are enclosed by either single quotes, double quotes or triple quotes. STRING DECLARATIONS PYTHON Strings can be enclosed within: INTRODUCTION TO PYTHON STRINGS : Output STRING COMMENTS Python strings are commented in multiple ways. For single line comment we will use # …

INTRODUCTION TO PYTHON STRINGS Read More »

INTRODUCTION TO PYTHON LISTS

INTRODUCTION TO PYTHON LISTS INTRODUCTION LIST ELEMENT DATA TYPE Checking the data type of a list. INTRODUCTION TO PYTHON LISTS : Output Data type of elements in the list can be of any data type. STRING LIST String lists containing all the string elements. INTRODUCTION TO PYTHON LISTS : Output In the above example print …

INTRODUCTION TO PYTHON LISTS Read More »

PYTHON CALCULATORS

PYTHON CALCULATORS BODMAS RULE: ADDITION & SUBTRACTION: Addition and Subtraction operator are just + and – of simple arithmetic. PYTHON CALCULATORS : Output In the above example we have seen the various combination of addition and subtraction. Using parenthesis has the same impact as in BODMAS rule. MULTIPLICATION: PYTHON CALCULATORS : Output DIVISION: PYTHON CALCULATORS …

PYTHON CALCULATORS Read More »