PYHTON PROGRAM
#Program of using Class and object in python
class cal:
a=int(input("Enter a="))
b=int(input("Enter b="))
obj=cal()
print("\n")
print("Addition:",obj.a+obj.b)
print("Substraction:",obj.a-obj.b)
print("Multiplication:",obj.a*obj.b)
print("Division:",obj.a//obj.b)
print("Remainder:",obj.a%obj.b)
print("Square of a:",obj.a*obj.a)
print("Square of b:",obj.b*obj.b)
No comments:
Post a Comment
let me know which type examples you want to comment me.