FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonprogram/AreaTriangle at master · s-sst/pythonprogram · GitHub
s-sst
pythonprogram
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonprogram
/
AreaTriangle
Copy path
More file actions
More file actions
Latest commit
History
History
History
10 lines (8 loc) · 277 Bytes
Breadcrumbs
pythonprogram
/
AreaTriangle
Copy path
File metadata and controls
10 lines (8 loc) · 277 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
a = float(input('Enter first side: '))
b = float(input('Enter second side: '))
c = float(input('Enter third side: '))
# calculate the semi-perimeter
s = (a + b + c) / 2
# calculate the area
area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
print('The area of the triangle is %0.2f' %area)
Back
|
FazBrowse Home
|
New Git URL