Exercise 3: this exercise is inspired by a story about the

Exercise 3: This exercise is inspired by a story about the mathematician Carl Frederich Gauss. When young Gauss was in grade school, his teacher got mad at his class one day. “I’ll keep the lot of you busy for a while”, the teacher said sternly to the group. “You are to add the numbers from 1 to 100, and you are not to say a word until you are done.” 1- Read a new book 2- Display list of unread books 3- Display list of read books 4- quit The teacher expected a good period of quiet time, but a moment later Gauss find the answer. “It’s 5050!” Gauss had realized that if you list all the numbers from 1 to 100, you can always match the first and last numbers in the list and get a common answer: Gauss realized there were exactly 50 pairs of numbers in the range 1 to 100, so he did a quick calculation: 50 * 101 = 5050. Write a program that use a list of numbers.  The program should use a while loop to keep popping the first and last numbers from the list and calculate the sum of those two numbers.  The program should print out the current numbers that are being added, and print their partial sum.  The program should keep track of how many partial sums there are.  The program should then print out how many partial sums there were.  The program should perform Gauss’ multiplication, and report the final answer.  Modify your program so that it works for any set of consecutive numbers, whether that set has an even or odd length Hint: use pop() function to return list items.

Calculate your order
Pages (275 words)
Standard price: $0.00
Client Reviews
Our Guarantees
100% Confidentiality
Information about customers is confidential and never disclosed to third parties.
Original Writing
We complete all papers from scratch. You can get a plagiarism report.
Timely Delivery
No missed deadlines – 97% of assignments are completed in time.
Money Back
If you're confident that a writer didn't follow your order details, ask for a refund.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
Power up Your Academic Success with the
Team of Professionals. We’ve Got Your Back.
Power up Your Study Success with Experts We’ve Got Your Back.