Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Assignment-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
arjun.b
Assignment-1
Commits
3723a5c3
Commit
3723a5c3
authored
Jan 17, 2023
by
arjun.b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
project structure updated
parent
97245889
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
7 deletions
+18
-7
app.py
+3
-0
scripts/constants/const.py
+1
-0
scripts/core/handlers/Circle.py
+7
-2
scripts/core/handlers/rectangle.py
+0
-0
scripts/core/handlers/square.py
+0
-0
scripts/services/index.py
+7
-5
No files found.
app.py
0 → 100644
View file @
3723a5c3
from
scripts.services.index
import
shape
shape
()
scripts/constants/const.py
0 → 100644
View file @
3723a5c3
pi
=
3.14
s
hape
/Circle.py
→
s
cripts/core/handlers
/Circle.py
View file @
3723a5c3
from
scripts.constants.const
import
*
class
myException
(
Exception
):
class
myException
(
Exception
):
pass
pass
class
Circle
:
class
Circle
:
def
__init__
(
self
,
radius
):
def
__init__
(
self
,
radius
):
self
.
radius
=
radius
self
.
radius
=
radius
def
area
(
self
):
def
area
(
self
):
try
:
try
:
return
3.14
*
self
.
radius
*
self
.
radius
return
pi
*
self
.
radius
*
self
.
radius
except
myException
:
except
myException
:
print
(
"exception occurred"
)
print
(
"exception occurred"
)
def
perimetr
(
self
):
def
perimetr
(
self
):
try
:
try
:
return
2
*
3.14
*
self
.
radius
return
2
*
pi
*
self
.
radius
except
myException
:
except
myException
:
print
(
"exception occurred"
)
print
(
"exception occurred"
)
s
hape
/rectangle.py
→
s
cripts/core/handlers
/rectangle.py
View file @
3723a5c3
File moved
s
hape
/square.py
→
s
cripts/core/handlers
/square.py
View file @
3723a5c3
File moved
index.py
→
scripts/services/
index.py
View file @
3723a5c3
from
s
hape
.rectangle
import
Rect
from
s
cripts.core.handlers
.rectangle
import
Rect
from
s
hape
.Circle
import
Circle
from
s
cripts.core.handlers
.Circle
import
Circle
from
s
hape
.square
import
Square
from
s
cripts.core.handlers
.square
import
Square
i
=
1
while
i
==
1
:
def
shape
():
i
=
1
while
i
==
1
:
print
(
"enter the choice
\n
1.area and perimeter of rectangle
\n
"
print
(
"enter the choice
\n
1.area and perimeter of rectangle
\n
"
"2.area and perimeter of circle
\n
"
"2.area and perimeter of circle
\n
"
"3.area and perimeter of square
\n
"
"3.area and perimeter of square
\n
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment