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
16 changes: 16 additions & 0 deletions EAGLEWARRIOR/anagram.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
class check_anagram:
def __init__(self,s1,s2):
self.s1=s1
self.s2=s2
def check(self):
# the sorted strings are checked
if(sorted(self.s1)== sorted(self.s2)):
print("The strings are anagrams.")
else:
print("The strings aren't anagrams.")
if __name__=='__main__':
# driver code
s1 =input("Enter the first string")
s2 =input("Enter the first string")
c_anangram=check_anagram(s1,s2)
c_anangram.check()
49 changes: 49 additions & 0 deletions EAGLEWARRIOR/calculator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
class Simple_arthimetic_Operation:
def __init__(self,num1,num2):
self.num1=num1
self.num2=num2

def add(self):
print(self.num1 + self.num2)


def sub(self):
print(self.num1 - self.num2)


def mul(self):
print(self.num1 * self.num2)


def div(self):
print(self.num1 / self.num2)

def mod(self):
print(self.num1 % self.num2)

def expo(self):
print(self.num1 ** self.num2)

def floor(self):
print(self.num1 // self.num2)

if __name__=='__main__':
a = float(input("Enter the first number"))
b = float(input("Enter the second number "))
op = input("Enter the arthemetic operation you want to perform ")
calculator=Simple_arthimetic_Operation(a,b)
if op == "+":
calculator.add()
elif op == "-":
calculator.sub()
elif op == "*":
calculator.mul()
elif op == "/":
calculator.div()
elif op=="%":
calculator.mod()
elif op=="**":
calculator.expo()
elif op=="//":
calculator.floor()