Skip to content

Instantly share code, notes, and snippets.

@ebovio
Created April 16, 2017 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebovio/ce84d043c6db643e46f7e404f28cc81a to your computer and use it in GitHub Desktop.
Save ebovio/ce84d043c6db643e46f7e404f28cc81a to your computer and use it in GitHub Desktop.
#Problem7
def sumsquares_list(list):
sum_squares = 0
for i in list:
x = i **2
sum_squares += x
return sum_squares
#Main program below
list = []
values= int(input("How many values you want in the list:"))
for i in range(values):
num = int(input("Write a value:"))
list.append(num)
print ("The sum of the squares of the list you provided is", sumsquares_list(list))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment