[Applause] [Music] dear students welcome to another video today we are going to learn about numeric and string data types in Python names of functions modules or user defined items are called as identifiers okay X and Y A and B first number and second number number one and number two so that others can easily check and understand your commands or your program y top data types and definition a data type in Python defines the type of value a variable can hold and determines what operations can be performed on that data it can be an integer floting Point number string or another type and python is a dynamically typed language number 455 number so python will automatically assign the variable type as integer your same instruction willor but in Python Ty automatically so it is a dynamically Ty language numeric data types numeric data types can be of three types integer float and complex integer data type integers represent whole numbers positive or negative numbers without decimal points and xal to 10 or Y is equal 5 and these numeric data types are basically used for arithmetic operations that addition subtraction multiplication okay and next is float data type float represents real numbers which containing a decimal point example AAL to 3.14 B is equal to -75 here A and B are float variables scientific notation xal 3 e - 10 and it represents 3 into 10 the power - 10 another numeric data type is complex data type so a complex number have real and imaginary parts and imaginary part is denoted by small letter J syntax and example outome C is = 2 + 3 J here two is the real part and three is the imaginary part another example D is equal to -1 + 4 J so C and D are of variables with type complex ID maximize the console type number one number uncore 1 equal to 15 the data type of the variable is integer data typ dat type of variable return function that is Type in bracket provide the variable name and it print the type of variable so here it returns int that is integer variable deare number underscore 2 = to - 3.57 data type float okay another variable number underscore 3 is equal to 3 + 4 J and that variable is of type complex anyway proper syntax follow 3 + 4 3 + 4 I it will returns an error because proper syntax to be followed in Python next is string data type strings are sequence of characters enclosed in Cotes single line string we can provide single or double quotes multiple line string use triple codes Tri examp name underscore 1 equal to within double codes par space Roy single name underscore 2 L to within single codes par Roy yes it is valid and a data type check here type function within the round brackets variable name and it returns Str Str St Str means string of class string multiple L address equal to in triple codes first line bgi next lineal next line district and end with triple course but trip back to the presentation string reler three important operations concatenation using plus operator repeat strings using asri operator and indexing examp type name _ 1 equal to within codes par another variable name uncore 2 equal to within codes string Roy then name three which is equal to name 1+ name two if the plus operator in between the strings is used for joining two strings that is concatenation so name underscore 3 which is displayed as Paro but under strings join between two string name 3al name one plus within double code space space character plus name two so name three is part space Roy so strings concatenate operator numme operation addition strings then name underscore 3 asct 2 part two times repeat here as symbol on string is used for repetition okay operator multiplication operator name three Vari string character is name three name underscore 3 then in square bracket and a position that is the index zero if the index starts from zero and not from one so it produce the output as capital P next is name uncore 3 within square brackets IND and it Returns the second character so the index start from zero second character index is one okay so using square bracket and index number individual characters in a string can be selected M data type could under Boolean ban variable can store two values either true or false variabl Boolean operations two operations comparison and equality checking X greater than Y X and Y are two variables actually it is checking the condition X greater than y according to the value of a and b it can be either true or false condition x equal toal to 5 equal to equal to operator is equality checking operator again value return true or false example x = 3 and Y is equal 0 and type X greater than y and hit enter it returns true so condition true X is greater than y then type X less than y and it returns false now type x equal toal to 5 okay it is a false and it returns false okay next is type conversion in Python type conversion refers to the process of converting the value of one data type to another variable data for example integer to float or float to integer data type or number to stringers implicit type and explicit type examples definitions type number underscore one equal to 5 and type of variable is INT in integer now assign a float value 4.5 to the same variable and now check the type it is float so initially it was integer data type float value assign automatically the variable type converted to float this type of conversion is automatic or it is called implicit type conversion conversions manually inm example type number _ 2 = to 4.5 and type is floore 3 is equal to INT in round brackets number underscore 2 and the meaning value stored in variable number two which was originally Flo was converted to integer and stored in the variable number three so int function is a buil-in function in Python to convert the argument to integer it buil-in functions explicit type conversion and back to the presentation two types of conversions implicit type conversion or automatic another one explicit type conversion or manual type conversion okay session complete and see you in the next class thank you