Answer:
1.)
def two(a, b) :
print(a+b)
print(a*b)
2.)
a = int(input('enter an integer values '))
b = int(input('Enter another integer value' ))
print(a+b)
print(a*b)
3.)
Take side of a square from user and print area and perimeter of it.
def square(a):
area = a**2
perimeter = 4*a
print(area, perimeter)
Explanation:
Code written in python :
The first function named two, takes to arguments a and b ;
The sum of integers a and b is taken and displayed using ; print(a+b)
The product of integers a and b is taken and displayed using ; print(a*b)
2.)
User can enter an input and converted to an integer value using the command ;
int(input()) ; the sum and product of these values are displayed using :
print(a*b) and print(a+b)
The Area and perimeter of a square requires the side length, which is taken as the argument a in the square function defined.
Area of square = a² = a**2
Perimeter = 4 * a