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 :: how to declare np datetime 
Python :: disable gpu in jupyter notebook in tensorflow 
Python :: ipaddress in python 
Python :: decode vnc hash 
Python :: get array dimension numpy 
Python :: pandas reset index from 0 
Python :: python string ends with 
Python :: timedelta python days 
Python :: how to merge two dictionaries with same keys in python 
Python :: functools reduce python 
Python :: basic string functions in python 
Python :: conda cassandra 
Python :: plotly pie chart in pie chart 
Python :: start virtual environment python linux 
Python :: django data from many to many field in template 
Python :: yticks matplotlib 
Python :: code folding vim python 
Python :: lambda en python 
Python :: get html input in django 
Python :: python remove duplicates from list of dict 
Python :: python elapsed time in milliseconds 
Python :: flatten a list 
Python :: python if elif else 
Python :: input two numbers in python in a single line 
Python :: keras model compile 
Python :: create a window using tkinter 
Python :: python pandas return column name of a specific column 
Python :: solidity compiler for python 
Python :: randomly pick a value in the list 
Python :: django trim string whitespace 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =