Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Python Program to Calculate the Area of a Triangle - CodeGK
Δ Python Examples
Examples
Python Program to Print Hello world!
Python Program to Add Two Numbers
Python Program to Find the Square Root
Python Program to Calculate the Area of a Triangle
Python Program to Solve Quadratic Equation
Python Program to Swap Two Variables
Python Program to Generate a Random Number
Python Program to Convert Kilometers to Miles
Python Program to Convert Miles to Kilometers
Python Program to Convert Celsius To Fahrenheit
Python Program to Convert Fahrenheit To Celsius
Python Program to Check if a Number is Odd or Even
♦ Python Program to Calculate the Area of a Triangle
♣ Example1: Python Program to Calculate the Area of a Triangle
Input:
Run CODE
Reload Code
Copy Code
def heronsArea(a, b, c): sp=(a+b+c)/2 area_sq=sp*(sp-a)*(sp-b)*(sp-c) area=(area_sq)**0.5 return area a,b,c=3,4,5 print(heronsArea(a,b,c))
Output: