Computer Science, asked by vanishiva02498, 1 month ago

write a python program to calculate the area of rhombus

Answers

Answered by aaditharun87
1

Answer:

# This is a python program which calculates the area of a rhombus.    

# It is a function to calculate the area of rhombus  

def findAreaofrhombus(d1, d2):  

    return ( ( d1 * d2 ) / 2) # It is a formula which adds the three side and # then return the value to the statement of calling function.    

d1 =30  

d2= 40  

print(findAreaofrhombus(d1,d2))  

Hope it helped!

Answered by MrTSR
0

Answer

d1 = float (input ("Enter diagonal 1 :" ) )

d2 = float(input ("Enter diagonal 2 :" ) )

area=(d1*d2)/2

print ("Area :",area)

Example Output

Enter diagonal 1 : 5                                                                                                                            

Enter diagonal 2 : 7                                                                                                                          

Area : 17.5  

Refer above attatchment for example :)

Attachments:
Similar questions