Program to print the square root of all numbers between 1 and N

 



#accept a number N from user and print the square root of all numbers between 1 and N

import math #importing math module to use for finding square root

n=int(input("Enter the number n: "))

print("Square roots of all numbers between 1 and",n,"are")

for i in range(1,n+1):

    a=math.sqrt(i)

    print(a)






Comments

Popular Posts