Question #235079

You are given two given numbers, A and B where 1 <= A <= B, Write a program to find the number of perfect squares in the range A to B (including A and B).




Expert's answer

A = int(input())
B = int(input())
count = 0
for i in range(A, B + 1):
    if int(i ** 0.5) == i ** 0.5:
        count += 1
print(count)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS