Skip to content

Instantly share code, notes, and snippets.

@akhildevelops
Created March 15, 2016 01:11
Show Gist options
  • Save akhildevelops/4aca23248d30339ba129 to your computer and use it in GitHub Desktop.
Save akhildevelops/4aca23248d30339ba129 to your computer and use it in GitHub Desktop.
class OddEven:
"Detect Odd / Even"
def __init__(self,Number):
self.Num=Number
def Result(self,Number=None):
if Number==None:
Number=self.Num
if Number%2==0:
if Number%4==0:
print "Its a Multiple of Four"
else:
print "Its Even"
else:
print "Its Odd"
class Divisor:
"Detect Even Quotients"
def __init__(self,Num,Div):
self.Num=Num
self.Div=Div
def quote(self):
if (self.Num/self.Div)%2==0:
print "Yes it gets Evenly Divided"
else:
print "It Does not"
Ask=input("Type 1 for OddEven or other for Quotient Check")
if Ask==1:
Number=input("Enter A Number")
first=OddEven(Number)
first.Result()
else:
Number=input("Enter A Number")
Divi=input("Enter Divisor")
second=Divisor(Number,Divi)
second.quote()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment