Question: 2. Write a python3 program that takes a positive integer N from user's input and do the following things: Check whether it's a positive integer.

2. Write a python3 program that takes a positive integer N from user's input and do the following things: Check whether it's a positive integer. If not, re-take user input. Calculate sum of squares of numbers from 1 to N So if the user inputs 4, the program should output 30 ( = 12 + 22 + 32 + 42 ).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!