Computer Science, asked by karthik5435, 7 months ago

Find the area of a triangle and check whether the area is palindrome or not.
Input
6
8
Output
Area of a triangle = 11
Area is palindrome​

Answers

Answered by poojan
2

Language used: Python Programming

Program:

import math

#Using heron's formula, let us find the area of the triangle

#Take the lengths of the sides of the triangle as inputs

a = int(input())

b = int(input())

c = int(input())

#Calculating parameter

s = (a+b+c)/2

#Calculating the area, taking it's integer part.

area = math.floor(math.sqrt((s)*(s-a)*(s-b)*(s-c)))

print("Area of a triangle = ", area)

#In string version, check if the area value and it's reverse is same or not. If yes, print the statement "Area is palindrome".

if str(area) == str(area)[::-1]:

   print("Area is palindrome")

Input:

4

6

8

Output:

Area of a triangle = 11

Area is palindrome

Learn more:

Your friend and you made a list of topics and both of them voted if they like or dislike the topic. They wrote 0 to denote dislike and 1 to denote like..

brainly.in/question/44681897

Indentation is must in python. Know more about it.

brainly.in/question/1773116

Attachments:
Similar questions