Python top 25 Logical programming interview question & Answer | important python language question and answer ?
😀 Python top 25 Logical programming interview question & Answer. It is very useful for Fresher and Experience. If you learn this make sure you can get good marks in your exam and interview. 1.Write a program to find Area of Triangle..? Ans- a = float(input('Enter first side: ')) b = float(input('Enter second side: ')) c = float(input('Enter third side: ')) s = (a + b + c) / 2 # calculate the area area = (s*(s-a)*(s-b)*(s-c)) ** 0.5 print('The area of the triangle is %0.2f' %area) =>Output- Enter the first side: 5 Enter the second side: 7 Enter the third side: 8 The area of the triangle is 17.32 2.Write a program to check A Leap Year or Not..? Ans- year = int(input("Enter a year: ")) if (year % 4) == 0: if (year % 100) == 0: if (year % 400) == 0: print("{0} is a leap year".format(year)) else: print("{0} is not a leap year".format(year)) else: