Skip to content
This repository was archived by the owner on Aug 20, 2024. It is now read-only.

Changed 3.14 float to math.pi call #138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Python/PythonBasics/shapes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

if shape == "C" :
r = float(input("Enter the radius of the circle"))
print("Perimeter is ",(2 * 3.14 * r))
print("Area is ",(3.14 * r * r))
print("Perimeter is ",(2 * math.pi * r))
#math.pi = 3.141592
print("Area is ",(math.pi * r * r))

elif shape == "R" :
l = float(input("Enter the length of the rectangle"))
Expand Down
Loading