 Hello friends, I'm Naval Emul working as the assistant professor in mechanical engineering department Walsh and Institute of Technology, Sulapur. In this Python series of videos, we are going to see the Python programs learning outcome. At the end of this session, students will be able to understand and execute simple programs on Python. Content of this video is simple program on Python. So first program, write a simple program on Python to find the data type. So I have taken a equal to 29 print a the output will be 29 year and print what is the type of a here? So a is integer. So if you want to find the type of or data type of this a so the function would be print type in bracket a equal to 3.4 then print a print type a so this is float here and a equal to W it print a print the output and also say the type of or data type of the a so the output would be like so in the first it's showing 29 and the class is integer here 3.4 output then the class would be float and here it is W it and the output is W it and the class is string here so we'll see next simple program for getting input from the user so we have already seen a video on input so for input the function would be num any variable equal to integer then in bracket input so if you want a data type of integer it should be start with int then input enter an integer and print this num and here if you want to input a string s equal to input enter any string so here Python automatically takes this as a integer and this as a string so the output for these two simple programs would be if you if there's a message to the user that enter an integer and if user enters a number 6 the output would be 6 and here so the message for the user would be enter any string if we enters W it the output would be W it so write a program to find square and cube of any number so the program would be like x as a variable equal to int input enter a number some message to the user and whatever the user enters it will square it square again a new variable that is equal to x into x that is multiplying x with x you get square and for cube we use this x three times then print square of a number and we call square here showing the output of the square and cube of a number it is showing the cube of a number so the output would be enter a number if a user enters 5 as a number it goes here calculates here and it shows as square of a number is 25 and the cube of a number is 125 so write a program to perform mathematical operations using two numbers so in previous video we have seen mathematical operators and we have seen a simple program also but in this video and in this program we are going to do the same operations but we are taking the numbers from the user so here x and y so integer input enter a number so we are taking x value from the user and y value also from the user and x and y we are going to add these two and take a new variable called add and add x and y in that and we print sum equal to and we call add here in the same way subtraction is done multiplication is done division is done and modulus that is reminder is also calculated we have all we have seen all these operators in the previous video please go through that previous video you will get to know the mathematical operators so the output would be first message to the user will be enter a number that is 5 then enter a number that is 7 so x and y are assigned as 5 and 7 so it will show sum equal to addition of these two subtraction equal to addition of sorry subtraction of these two multiplication then division then you get a reminder of these two so 5 divided by 7 the reminder would be 5 so next three programs will be calculating the areas of rectangle circle and triangle so it is very simple for calculating the area of rectangle you need to know the formula that is area equal to length into breadth so here we need two variables that is length and breadth so we have taken two variables l and b so we are taking the use input from the user enter the length of the rectangle and enter the breadth of the rectangle these two are stored in l and b and the formula for calculating the area of rectangle equal to area equal to length into breadth so the final output would be area of rectangle equal to we are calling this area so the output would be like this enter the length of rectangle suppose if the user enters 5 and the breadth may be 8 the area would be l into b that is 8 into 5 40 so write a program to calculate the area of circle in for calculating area of circle you need to know the formula for area of circle that is pi r square so in simple you need only one variable that is r radius enter a radius area would be pi in pi value is 3.14 i have already written here into r into r that is pi r square in the radius of the circle would be we call area so if the user enters 6 the radius of the circle would be 113.03999 so next so the next program will see how to calculate the area of triangle so before calculating the area of triangle so just pause the video for few seconds and think what would be the formula for area of triangle for three sides okay the mathematical formula for calculating the area of triangle is square root of square root of s into s minus a into s minus b into s minus c where a b c are the three sides of the triangle so we will see the program here so side one side two side three we are taking the values from the user side one side two side three then we are taking s as one more variable that is nothing but side one plus side two plus side three divided by two then area would be s into this one s into s minus a into s minus b into s minus c i have taken a b c as variable side one side two side three then we are using a math function here to calculate the square root of this s area so square root of area would be area of the triangle and we are calling this area we can do with one more method also so we have to take this all and power 0.2 for power function we are using a strict sign two times that is into and into raised to 0.5 we get the same or we have if you are using square root we use a math function so the output would be so if the user enters three sides that is five six and seven the area of triangle would be 14.69 so we will see the next program to convert kilometers to miles miles so here we need to know one kilometer is equal to 0.62 137 miles so we are taking input from the user like how many kilometers you need to convert then the conversion factor has 0.62 then calculation like miles equal to kilometers into conversion factor so final output would be kilometers is equal to miles and we call this miles so miles is nothing but kilometers into conversion factor kilometers is whatever the user enters here and conversion factor kilometers multiplied by the conversion factor so the output would be if user enters as three the output would be 1.8641 next we will see a program to swap two variables so for swapping two variables we need three variables one is x one is y and we need one more variable called temporary variable we are storing this temporary variable x value stored in temporary variable and y stored in x and again whatever the value is stored in temporary we are taking out in y so two variables and one temporary variable so the value of x after swapping would be x and after swapping it would be y so the output would be enter the value of x4 and enter the value of y as five it will swap the x value becomes four and the value becomes five so we will see how to calculate the simple interest for calculating simple interest the formula for the simple interest is p and r divided by 100 so you need three variables one is principal amount and second is the rate of interest then third is the number of years so and one more variable for simple interest that is p and r divided by enter so simple interest equal to si and we are taking one more variable that is final amount would be simple interest plus principal amount so final amount would be so the output is if the user enters the principal amount as 10000 and the rate of interest as 12 for five years the simple interest would be 6000 and the final amount would be principal amount plus simple interest that is 16000 so these were the simple programs you can try this so these are the references I have used thank you