Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python basic programs area caluclation

# Python Program to find the area of triangle

a = 5
b = 6
c = 7

# Uncomment below to take inputs from the user
# 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)
Comment

PREVIOUS NEXT
Code Example
Python :: python count down advanced 
Python :: python check anangram 
Python :: python return multiple value from a function using a dictionary 
Python :: Using iterable unpacking operator * 
Python :: python created nested directory 
Python :: Abstract Model inherit from another model django 
Python :: pyqt5 different resolutions 
Python :: how to download a website using python 
Python :: reveal a defined function in python 
Python :: dataframe no names from file 
Python :: print chr character in python f string 
Python :: internet spam 
Python :: how to install pandas in python by git 
Python :: star rating form in flask 
Python :: print("Default max_rows: {} and min_rows: {}".format( pd.get_option("max_rows"), pd.get_option("min_rows"))) 
Python :: scatter plot actual vs predicted python 
Python :: changing instance variable python inheritance 
Python :: pygame do you need to use int() for positions 
Python :: add 10 min to current time django 
Python :: numpy generate sequence from 0 to n 
Python :: Python Global variable and Local variable with same name 
Python :: fancy index 
Python :: plotly two y axis bar chart 
Python :: odoo 8 request.session.authenticate 
Python :: put legend in subplot 
Python :: numpy topk 
Python :: how to open local software using python 
Python :: flask how to initialze extension after start 
Python :: python raccourci mettre paragraphe commentaire 
Python :: python lambda append to list and return it 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =