Machine Problem 1-3
Create a Python program for displaying the square of numbers from 0 - 30.
DS100-1
3Q1920Info! Broken links? Email us at gtechphofficial@gmail.com
Code:
def sqr(value):
sq = []
for i in range(value+1):
current = i
sq.append(current**2)
return sq
print("The square of first 30 numbers are: " + str(sqr(30)))