Answer to Question #313241 in Python for Sai pawan

Question #313241

Perfect squares In a range


1
Expert's answer
2022-03-17T15:18:37-0400
import math
for i in range(1,int(input(''))+1):
    if math.sqrt(i).is_integer() == True:
        print(i,end=' ')

9
1 4 9 

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