Answer to Question #231102 in Python for bhuvana

Question #231102

Given two integers (M and N), write a program to print the first perfect square in a given range.


1
Expert's answer
2021-08-30T07:30:28-0400
m = int(input('M = '))
n = int(input('N = '))
res = None
for i in range(m,n+1):
	if i**(1/2) == int(i**(1/2)):
		res = i
		break
print(res)

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