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 :: python bubble sort 
Python :: gradient boosting regressor 
Python :: python 3.7.9 download 
Python :: unique value python 
Python :: thread syntax in python 
Python :: how to empty a dictionary in python 
Python :: create panda dataframe 
Python :: get weekday from date python 
Python :: itertools .cycle() 
Python :: python using enum module 
Python :: subtract list from list python 
Python :: scrapy get inside attribute value 
Python :: at=error code=h10 desc= app crashed python flask 
Python :: delete occurrences of an element if it occurs more than n times python 
Python :: python string cut last character 
Python :: selenium webdriver options python 
Python :: matplotlib savefig legend cut off 
Python :: python string find 
Python :: check number of elements in list python 
Python :: python remove common elements between two lists 
Python :: double variable for loop python 
Python :: print input in python 
Python :: python change directory to previous 
Python :: inser elemts into a set in python 
Python :: python if statement 
Python :: pandas df represent a long column name with short name 
Python :: multiple arguments with multiprocessing python 
Python :: what is += python 
Python :: how to merge two dictionaries with same keys in python 
Python :: deleting a file using python 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =