Could anyone answer this question...
Write a python program to print the sum of the squares of the numbers up to a limit
I've answered this question but ,my sir doesn't agree with my answer :(
Answers
Answered by
1
limit = int(input("Enter limit: "))
print(sum([n ** n for n in range(1, limit + 1)]))
Similar questions