Python Function which receives a float and an int from main(), finds the product of these two and returns the product which is printed through main().

#Python Function which receives a float and an int from main(), finds the product of these two and returns the product which is printed through main().


def product(i, j):
	pr = i*j
	return pr
print("\nEnter Float Value :")
a = float(input())
print("\nEnter Integer Value :")
b = int(input())
p = product(a,b)
print("\nThe product is ", p)

Output :
Enter the two values to find the product(float x int): 25.5
2

The product is 51.00



Leave a comment