Given two integers (M and N), write a program to print the first perfect square in a given range.
N = int(input('N:')) M = int(input('M:')) for num in range(N, M + 1): if num ** .5 == int(num ** .5): print(num) break
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment