# Python Program to Calculate Area of Triangle Given Base & Height

#### This python program calculates area of triangle from given value of base and height.

This program uses following formula to calculate area of triangle:

Area of Triangle = ½ * base * height

## Python Source Code: Area of Triangle

``````
# Area of triangle

base = float(input('Enter base: '))
height = float(input('Enter height: '))

# Calcualtion
area_triangle = base*height/2

# Displaying result
print('Area of triangle is %f' %(area_triangle))
``````

## Python Output: Area of Triangle

```Enter base: 23
Enter height: 32
Area of triangle is 368.000000
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.70029485,"math_prob":0.9839674,"size":617,"snap":"2023-40-2023-50","text_gpt3_token_len":144,"char_repetition_ratio":0.22022839,"word_repetition_ratio":0.0,"special_character_ratio":0.2560778,"punctuation_ratio":0.086538464,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9994618,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-10-02T11:43:07Z\",\"WARC-Record-ID\":\"<urn:uuid:6cb2927c-7c84-4efd-8f8d-978a42ffb514>\",\"Content-Length\":\"81677\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4571f9a3-bb5c-4cd4-812b-66373bbccc08>\",\"WARC-Concurrent-To\":\"<urn:uuid:9f87a1f9-5a2d-473b-b70a-cf43d9d0a375>\",\"WARC-IP-Address\":\"167.99.160.99\",\"WARC-Target-URI\":\"https://www.codesansar.com/python-programming-examples/triangle-area-base-height.htm\",\"WARC-Payload-Digest\":\"sha1:XO62W4LBV5ORZGSK5YM5YTHB5TYAADZC\",\"WARC-Block-Digest\":\"sha1:XL5DZPIJX74VA3XMJOEWMXS7CCHUUE2C\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233510994.61_warc_CC-MAIN-20231002100910-20231002130910-00198.warc.gz\"}"}