8000 Added area of triangle program and updated readme · enthuleo/programminginpython.com@cb91f58 · GitHub
[go: up one dir, main page]

Skip to content

Commit cb91f58

Browse files
committed
Added area of triangle program and updated readme
1 parent d9addc4 commit cb91f58

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# <a href="http://Programminginpython.com/">programminginpython.com</a>
22
This repo consists code of all the programs discussed at http://programminginpython.com/
3-
43
## List of all the programs
5-
<ul><li><a href="http://programminginpython.com/find-square-root-using-sqrt/">Find square root of a number using sqrt() function</a></li><li><a href="http://programminginpython.com/find-square-root-number-exponential-operation/">Find square root of a number using exponential operation</a></li><li><a href="http://programminginpython.com/python-program-calculate-sum-elements-list/">Python program to calculate the sum of elements in a list</a></li><li><a href="http://programminginpython.com/python-biggest-smallest-3-numbers-lists/">Python Program to find the Biggest and Smallest of 3 numbers using lists</a></li><li><a href="http://programminginpython.com/python-program-largest-smallest-number-list/">Python program to find the largest and smallest number in a list</a></li><li><a href="http://programminginpython.com/biggest-smallest-3-numbers/">Python Program to find the Biggest and Smallest of 3 numbers</a></li><li><a href="http://programminginpython.com/python-check-armstrong-number/">Python Program to check Armstrong number or not</a></li><li><a href="http://programminginpython.com/python-program-check-palindrome/">Python program to check whether a number is Palindrome or not</a></li><li><a href="http://programminginpython.com/python-program-to-find-reverse-of-a-number/">Python program to find reverse of a number</a></li><li><a href="http://programminginpython.com/find-reverse-number-slice/">Python program to find reverse of a number using slice</a></li><li><a href="http://programminginpython.com/python-program-find-number-prime-composite/">Python program to find a number is prime or composite</a></li></ul>
4+
<ul>
5+
<li><a href="http://programminginpython.com/python-program-area-triangle-base-height/">Python program to find area of triangle when base and height are given</a></li>
6+
<li><a href="http://programminginpython.com/find-area-of-triangle/">Python program to find area of triangle when all the sides are given</a></li>
7+
<li><a href="http://programminginpython.com/python-program-find-number-prime-composite/">Python program to find a number is prime or composite</a></li>
8+
<li><a href="http://programminginpython.com/find-square-root-using-sqrt/">Find square root of a number using sqrt() function</a></li>
9+
<li><a href="http://programminginpython.com/find-square-root-number-exponential-operation/">Find square root of a number using exponential operation</a></li>
10+
<li><a href="http://programminginpython.com/python-program-calculate-sum-elements-list/">Python program to calculate the sum of elements in a list</a></li>
11+
<li><a href="http://programminginpython.com/python-biggest-smallest-3-numbers-lists/">Python Program to find the Biggest and Smallest of 3 numbers using lists</a></li>
12+
<li><a href="http://programminginpython.com/python-program-largest-smallest-number-list/">Python program to find the largest and smallest number in a list</a></li>
13+
<li><a href="http://programminginpython.com/biggest-smallest-3-numbers/">Python Program to find the Biggest and Smallest of 3 numbers</a></li>
14+
<li><a href="http://programminginpython.com/python-check-armstrong-number/">Python Program to check Armstrong number or not</a></li>
15+
<li><a href="http://programminginpython.com/python-program-check-palindrome/">Python program to check whether a number is Palindrome or not</a></li>
16+
<li><a href="http://programminginpython.com/python-program-to-find-reverse-of-a-number/">Python program to find reverse of a number</a></li>
17+
<li><a href="http://programminginpython.com/find-reverse-number-slice/">Python program to find reverse of a number using slice</a></li>
18+
</ul>

area_of_triangle_base_height.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
__author__ = 'Avinash'
2+
3+
b = float(input('Enter base of a triangle: '))
4+
h = float(input('Enter height of a triangle: '))
5+
6+
area = (b * h) / 2
7+
print('The area of the triangle is %0.2f' % area)

0 commit comments

Comments
 (0)
0