diff --git a/EAGLEWARRIOR/anagram.py b/EAGLEWARRIOR/anagram.py new file mode 100644 index 0000000..1cd2506 --- /dev/null +++ b/EAGLEWARRIOR/anagram.py @@ -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() diff --git a/EAGLEWARRIOR/calculator.py b/EAGLEWARRIOR/calculator.py new file mode 100644 index 0000000..1ec48ba --- /dev/null +++ b/EAGLEWARRIOR/calculator.py @@ -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() +