Skip to content

Commit

Permalink
error in orders
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshlinux committed May 17, 2020
1 parent 3cf8dd9 commit 3afff8b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ModuleExamples/createModule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
def hello():
for x in range(10):
print('hello', x, end =" ")

def sum_digit(n):
sum1 = 0
while n!=0:
sum1 += n%10
n = n//10
return sum1

def simple_interest(p,r,t):
return p*r*t/100

def area_triangle(base,height):
return base*height

def isPrime(n):
found =0
for x in range(2,(n//2)+1):
if n%x==0:
found=1
return found
8 changes: 8 additions & 0 deletions ModuleExamples/module_call.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from createModule import isPrime


result = isPrime(11)
if result ==0:
print('Prime Number')
else:
print('Not a prime Number')

0 comments on commit 3afff8b

Please sign in to comment.