Skip to main content

Posts

Python Program to Convert Radians into Degrees

               Python Program to Convert Radians into Degrees     In this we are going to learn how to convert radians into degrees. Generally 1 radian=57.2958 degrees. In this program we use round function to round decimal values 3.         Input:          2        Out put:           114.592                  Explanation :          1 radian = 57.2958 degrees          2 radians = 2*57.2958 = 114.592 degrees                   Code:          r=int(input())           print(round(r*57.2958,3))           Note:     Hello Guys, Don't Stop Learning keep Going..............

Python Program to check given year is leap year or not?

              Python Program to check given year is leap year or not?     In this we are going to check given year is leap year or not. Generally Leap years are comes every 4 years from starting. Leap year contains 366 days (365+1) . We define a leapyear is divisible by 4 then leap year.       Input:          2000      Out put:            Leap year                Explanation :          2000%4 = 0 then it is leap year                   Code:          year=int(input())           if(year%400):               print("Leap year")          elif(year%100):               print("N...

Python Program to Convert Hectare to Acre

             Python Program to Convert Hectare to Acre       Generally 1 hectare = 2.471 acres. It is used find the area of the lands or farming. It is comes under unit conversions.       Input:          1      Out put:           2.471044            Explanation :                    Generally 1 hectare = 2.471044 acres                       Code:          hectare=int(input())           print(hectare*2.471044)           Note:     Hello Guys, Don't Stop Learning keep Going..............

Python Program to Convert Inches to Centimeters

            Python Program to Convert Inches to Centimeters           Generally 1 inch = 2.540 centimeters. It is comes under unit conversions. In this program we converting the inches to centimeters.       Input:          1      Out put:                      2.540               Explanation :                      1 inch = 2.540 centimeters then the answer will be 2.540        Code:          inches=int(input())           print(inches*2.540)           Note:     Hello Guys, Don't Stop Learning keep Going..............

Python Program to Convert hours into seconds

           Python Program to Convert hours into seconds             Generally 1 hour has 60 minutes. 1 minute has 60 seconds. In the solution we multiply value with 60*60 because of  above values. Then the code is given below that converts hours into seconds.           Input:          2       Out put:                     7200            Explanation :                     1 hour = 60 minutes, 1 minute = 60 seconds then          2*60*60 = 7200 seconds.                   Code:          hours=int(input())           print(hours*60*60)           N...

Python Program to find Perimeter of a rectangle

          Python Program to find Perimeter of a rectangle    perimeter of the rectangle = 2*(l+b) l = length of a rectangle b = breadth of the rectangle In this program we are going to find the perimeter of the rectangle by using formula. This is the one way to find the perimeter of a rectangle        Input:          6 7      Out put:            26      Explanation :                 l = 6 , b = 7          perimter of rectangle = 2*( l +b ) = 2*( 6 + 7 ) = 26        Code:          length, width = map( int, input().split())           print(2 * ( length + width))           Note:     Hello Guys, Don't Stop Learning keep Going..............

Python Program to find Area of a triangle

          Python Program to find Area of a triangle     Hint:                                                                      Area of traingle= 1/2bh                                                                      b=breadth of a triangle                                                                      h=height of a triangle   I...