Question: Python: Write a program that allows the user to enter a nonnegative integer k and returns the sum of the first k perfect squares, sk2.
Python:

Write a program that allows the user to enter a nonnegative integer k and returns the sum of the first k perfect squares, sk2. For example, if k = 4 the sum should be 12 + 22 + 32 + 42 = 1 + 4 + 9 + 16 = 30. A sample execution might appear as Enter k: 4 30
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
