Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python area of rectangle

l = float(input('Enter the length of a Rectangle: '))
b = float(input('Enter the breadth of a Rectangle: '))
Area = l * b
print("Area of a Rectangle is: %.2f" %Area)
Comment

Python code to find Area of Rectangle

def Rectangle(l,b):
    area = l*b
    return area
def main():
    length = int(input("Enter integer value of length: "))
    breadth = int(input("Enter integer value of breadth: "))
    areaOfRectangle = Rectangle(length, breadth)
    print("Area of the rectangle is: ",areaOfRectangle)
    
main()
Comment

Python program to calculate area of a rectangle using function

def AreaofRectangle(width, height):
    Area = width * height
    print("Area of a Rectangle is: %.2f" %Area)
AreaofRectangle(8, 6)
Comment

PREVIOUS NEXT
Code Example
Python :: list slicing reverse python 
Python :: cross entropy 
Python :: how to find the average in python 
Python :: list all pip packages 
Python :: global python 
Python :: python ternary operators 
Python :: how to make python print 2 line text in one code 
Python :: how to convert int in python 
Python :: positive and negative number in python 
Python :: add key to dictionairy 
Python :: add dataframe column to set 
Python :: python tokens 
Python :: shape function python 
Python :: add key value in each dictonary in the list 
Python :: how to create models in django 
Python :: python vrer un fichier texte 
Python :: tkinter filedialog 
Python :: circular import error 
Python :: python input().strip() 
Python :: print numbers from 1 to 100 in python 
Python :: python script to sort file content 
Python :: compare two excel files using python pandas 
Python :: example exponential distribution python 
Python :: python if else interview questions 
Python :: creating dynamic variable in python 
Python :: how to make a operating system in python 
Python :: python data first column indices 
Python :: Mixed Fractions in python 
Python :: EJERCICIOS DE FOR Y WHILE en python 
Python :: how to make a time limit using renpy 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =