Skip to content
← Back to Community
Area of triangle
Profile icon
Sobikasree

a=float(input("enter breadth and height of Triangle to Calculate the area"))
b=float(input("enter height"))
c= 0.5ab
print(c)

Voters
Profile icon
AmmadMujahid
Profile icon
Sobikasree
Comments
hotnewtop
Profile icon
LizFoster

I am assuming "breadth" means width (roughly anyways)?

How am I supposed to enter the width and height of the triangle? If I say "4, 3" there is an error, since it cannot convert that to a float. If I just say "4 3" I have the same issue. Also, right after asking for the width and height of the triangle, you ask for the height once more. What is this about?

Thank you!