Created
March 30, 2017 22:59
-
-
Save hector117/79f2728ccca4f426766661d6c951cf85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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