Hey guys I got an assignment from my school but I don't understand how to solve it I tried many ways. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Hey guys I got an assignment from my school but I don't understand how to solve it I tried many ways.

Complete the function definition so it returns the square of the product of the parameters, so sqrProd(2, 5) returns (2*5)*(2*5) = 100. Please help. This is what I tried... def sqrProd(x,y): return (x*y)*(x*y) for n in [2, 5]: print sqrProd(x,y)

16th Jul 2020, 3:15 PM
Mehul sathish
Mehul sathish - avatar
3 Answers
+ 3
Mehul sathish just run your functions with arguments: prints(sqrProd(2,5)) don't use for loop, and you are using it in wrong way.
16th Jul 2020, 4:07 PM
AKSHAY🇮🇳
AKSHAY🇮🇳 - avatar
+ 2
Thank you akshay.... I have just started learning python. Thanks a lot👍
16th Jul 2020, 4:13 PM
Mehul sathish
Mehul sathish - avatar
0
I edited it
16th Jul 2020, 3:51 PM
Mehul sathish
Mehul sathish - avatar