Answer to Question #350472 in Python for hussain

Question #350472

a=9

b=100

write a program to find a number of perfect squares a to b


1
Expert's answer
2022-06-14T08:42:51-0400
a = int(input("Enter a: "))
b = int(input("Enter b: "))


def perfectSquares(a, b):
    for i in range(a, b + 1):
        if i ** 0.5 == int(i ** 0.5):
            print(i, end=" ")


perfectSquares(a, b)

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