asked 29.8k views
0 votes
Write a while loop that prints a. All squares less than n. For example, if n is 100, print 0 1 4 9 16 25 36 49 64 81.

asked
User Datwelk
by
8.8k points

1 Answer

3 votes

Answer:

n = input()

a = 0

while pow(a, 2) < n:

print(pow(a, 2))

a += 1

Explanation:

answered
User Ldoogy
by
8.5k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.