Write a program in Python to accept 2 integers a and b from the user and perform the following operations:
1)Calculate exponentiation ( ab).
2)Unary addition on ‘a’ by 3.
3)Binarydivision.
4)Calculatemodulus.
Answers
Answered by
1
Answer:
import math
a = int(input("Enter a number:"))
b = int(input("Enter another number:"))
print("Exponentiation:",math.pow(a,b))
print("unary addition on",a,"by 3 is",(a+3))
print("Binary division of",a,"and",b,"is",(a/b))
print("After modulus operation:",(a%b))
Explanation:
Similar questions