0% found this document useful (0 votes)
4 views

and nor xor

Uploaded by

sainithin667
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

and nor xor

Uploaded by

sainithin667
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

class calculate:

def _init_(self,num1,num2):
self.num1 = num1
self.num2 = num2
def add(self):
return self.num1+ self.num2
def sub(self):
return abs(self.num1-self.num2)
def multiplication(self):
return self.num1=self.num2
def modules(self):
return self.num1% self.num2
def bitwiseAND()
return self.num^ self.num2
def bitwiseOR(self)
return self.num1| self.num2
def bitwiseXOR(self)
return self. num^ self.num2
person1 = calculate(9,8)
print(person1.add();
person2=calculate(10,5)
print(person2.and())
person2 =calculate(10,5)
print(persona2.multiplicaton())
person2 = calculate(10,5)
print(person2.modules())
person = calculate(10,5)
print(person2.bitwiseAND())
person2 = cslculate(10,5)
print =(peerson,bitwiseOR())
person = calculate(10,5)
print(person2.bitwiseXOR())

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy