Help with the code

please help me with this code function

Hello Anurag, pls tell your soln if you have done something in this ques. I will check that.
Thanks :slight_smile:
Happy Coding !!

iss code me starting hi smjh nhi aai …like kase kya start kru

Try to iterate the values of a and b. As it can be determined with the given conditions,
a^2 + b^2 = A
a <= b
that b can has the max value of square root A it cannot be greater than A^0.5
as, suppose if a is zero having the min value in that case b^2 = A, then b = A^(0.5).
So just iterate a from 0 to b and b from 0 to A^0.5 and at every step check if the sum of there square is equal or not if it is then count the pair.

n = int(input()) i=0 while ii<=n: j=i while jj<=n: if ii + jj ==n: print(str(’’) , i ,str(’’) , j) j+=1 i+=1

what’s wrong in this code?

Can you pls format it a liitle bit. It is not clearly understandable.

n = int(input())
i=0
while i i<=n:
j=i
while j
j<=n:
if i i + j j ==n:
print(str(’’) , i ,str(’’) , j)
j+=1
i+=1

If statement is II and jj

I * I
J * j

Text me star nhi aa rhe the …that’s why …

Hello Anurag, this is the code if you just want to check it once, and if you want to run this for multiple cases then you can also input the no. of testcases.

n = int(input())
i=0
while i*i<=n:
	j=i
	while j*j<=n:
		if i*i + j*j == n:
			print('('+str(i)+','+str(j)+')',end=' ')
		j+=1
	i+=1

And Anurag, you can use the tilde button to format your code in a proper manner. Just press this three times write your code and at last of your code again press it three times.
Tilde button is just like tilted inverted comma just below the esc button.
I hope you will understand this as well as the code.
Pls mark it as resolve if it is clear to you.
Thanks :slight_smile:
Happy Coding !!

still showing wrong ans

what is the issue now ??

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.