0% found this document useful (0 votes)
5 views5 pages

Areainpython

Uploaded by

njanu0781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views5 pages

Areainpython

Uploaded by

njanu0781
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment

Python
1|python

Institute: Govt. graduate college khanewal

Topic: Area in python

Submitted by: Muhammad yousaf

Roll no: GIPKM 23-02

Submitted to: Sir Saleem anjum

Department: Bs mathematics

Dated: 8 January 2025


2|python
Area of circle ................................................................................................................................................. 3
Area of rectangle........................................................................................................................................... 3
Area of a square ............................................................................................................................................ 4
Area of a right angled triangle ...................................................................................................................... 4
Area of triangle other than right angled ....................................................................................................... 4
3|python

Area of circle

>>> pi=3.1415926535897932384626433832795

>>> r=5
r=5
>>> print("area of circle",pi*r*r)

area of circle 78.53981633974483

Area of rectangle

>>> L=10
W=width=5
>>> W=5

>>> print("area of rectangle",L*W)


L=length=10
area of rectangle 50
4|python

Area of a square
>>> L=4

>>> print("area of square",L*L)

area of square 16
L=4

Area of a right angled triangle


>>> p=4 C
>>> b=3

>>> print(“area of triangle”,(p*b)/2)


b=3
area of triangle 6 a
A B
p=4
Area of triangle other than right angled
C
>>> h=5

>>> b=7

>>>print(“area of triangle”,(h*b)/2) h=5


area of triangle 17.5

A B
b=7

You might also like