My first program that I have ever written! Proud

# Program to find area of a triangle

def calculate_area(Width, Height):

area = Width * Height

return area

print("Calculate the area of a triangle")

Width_Input = float(input("What is the width? "))

Height_Input = float(input("What is the height? "))

area = calculate_area(Width_Input, Height_Input)

print("The area is " + str(area))

Reply to this note

Please Login to reply.

Discussion

Excellent! Keep up the progress 🤙

I'm not that great with maths, but you should probably check your formula.

Pretty sure that's the formula for the area of a square. For a triangle you want 0.5 * W * H

It's a good start though.