Skip to content
This repository was archived by the owner on Nov 3, 2020. It is now read-only.
Merged
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
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/Python-1.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 37 additions & 0 deletions ion05/2d-calc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import math
fig = input("For which figure do you want to calculate ?")
pie = 22/7
if fig == "Square":
no1 = float(input("Enter the length of the side "))
type = input("What do you want to calculate ?")
if type == "Area":
print(no1**2)
elif type =='Perimeter':
print(4*no1)
else:
print("Invalid Type")
if fig == "Rectangle":
l = float(input("Enter the length"))
w = float(input("Enter the width"))
type = input("What do you want to calculate ?")
if type == "Area":
print(l*w)
elif type == "Perimeter":
print(2*(l+w))
else:
print("Invalid Type")
if fig == "Triangle":
b = float(input("Enter the length of the base"))
h = float(input("Enter the height"))
a = (b*h)/2
print("The area is ",a)
if fig == "Circle":
r = float(input("Enter the radius of the circle"))
type = input("What do you want to calculate")
if type == "Area":
print(pie*(r**2))
elif type == "Circumference":
print(2*pie*r)
else:
print("Invalid Type")

39 changes: 39 additions & 0 deletions ion05/3d-calc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import math
pie = 22/7
fig = input("For which figure do you want to calculate ?")
if fig == "Cube":
s = float(input("Enter the length of the side"))
type = input("What do you want to calculate")
if type == "LSA":
print(4*s*s)
elif type == "TSA":
print(6*s*s)
elif type == "Volume":
print(s**3)
else:
print("Invalid Type")
elif fig == "Cuboid":
l = float(input("Enter the Length"))
w = float(input("Enter the width"))
h = float(input("Enter the Height"))
type = input("What do you want to c")
if type == "LSA":
a = 2((h*w)+(h*l))
print(a)
elif type == "TSA":
print(2((h*w)+(h*l)+(l*w)))
elif type == "Volume":
print(l*w*h)
else:
print("Invalid Type")
elif fig == "Sphere":
r = float(input("Enter the radius"))
type = input("What do you want to calculate ?")
if type == "TSA":
print(4*pie*r*r)
elif type == "Volume":
print((4*pie*r*r*r)/3)
else:
print("Invalid Type")