Help me in solving PSPP77 problem

My issue

why we use for loop

My code

for i
A,B =map(int,input().split())
def C=(A**2+B**3)+(A**2+B**3)**2+(A**2+B**3)**3
print(C)

Learning course: Learn Python
Problem Link: CodeChef: Practical coding for everyone

Hi pradeep6125,

We need to use looping statements like While-Loop or For-Loop because question has three individual sets of input A and B .

Here is The Updated Code :

for i in range(3) :
A,B =map(int,input().split())
C=(A2+B3)+(A2+B3)2+(A2+B**3)**3
print(C)

I HOPE IT HELPS

we used for loop to take no.of test cases … i.e;
if you enter 2
then we can get two test cases based on your looping variable … if you wrtie range(0,n) where n=2;
then 3 test cases i.e; 0,1,2.

for _ in range(3):
A, B = map(int, input().split())
fun=A2+B3+(A2+B3)2+(A2+B**3)**3
print(fun)

use this code it works ALL THE BEST!