add new task
This commit is contained in:
parent
a97cdecca5
commit
d1f553057a
14
practica/stepik/stepik_tasks/sum_of_squared_numbers.py
Normal file
14
practica/stepik/stepik_tasks/sum_of_squared_numbers.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
n = int(input())
|
||||||
|
list = [n]
|
||||||
|
while n!= 0:
|
||||||
|
m = int(input())
|
||||||
|
list.append(m)
|
||||||
|
n+=m
|
||||||
|
sum=0
|
||||||
|
k = [i**2 for i in list]
|
||||||
|
for num in k:
|
||||||
|
sum += num
|
||||||
|
print (sum)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user