Skip to content

Instantly share code, notes, and snippets.

@hector117
Created March 30, 2017 22:59
Show Gist options
  • Save hector117/79f2728ccca4f426766661d6c951cf85 to your computer and use it in GitHub Desktop.
Save hector117/79f2728ccca4f426766661d6c951cf85 to your computer and use it in GitHub Desktop.
def sumsquares_list(l):
t = 0
for i in l:
i = i * i
t = t + i
return t
#main program below
print("Problema 7 (Examen)")
l = []
x = int(input("Ingresa el número de valores que tendrá tu lista "))
for i in range(x):
y = int(input("Ingresa un número "))
l.append(y)
print("La suma de los cuadrados de los números de tu lista es de ",sumsquares_list(l))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment