Answer to Question #235079 in Python for ganesh

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).




1
Expert's answer
2021-09-09T17:11:46-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS