#write a function sum_sqr that has one parameter n #function returns 1*1+2*2+....+n*n #write a function process that has one parameter size #the function prints the sum of squares for all values between #1 and size #and finds and returns the total and average value of sum of squares #write a main that test your functions #YOU MUST USE LOOP FOR def sum_sqr(n): total=0 for i in range(1,n+1): total=total+i**2 return total def process(size): total=0 for i in range(1, size+1): sum_sqr_res=sum_sqr(i) print("i=", i, "sum_sqr=" ,sum_sqr_res) total=total+sum_sqr_res ave=total/size return total, ave def main(): size=int(input("enter size of the input ")) if(size>0): total, ave=process(size) print("total sum squares is ", total) print("average if sum squares is ", ave) else: print("invalid input") main()