Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some help creating a python program for this code - trying to do it as simply as possible Part A: Cumulative sum Your

I need some help creating a python program for this code - trying to do it as simply as possible

image text in transcribed

Part A: Cumulative sum Your task is to write a Python program that works on a Python list of numbers. Assume that you are given a Python list with float type and we will refer to this list as num_list. Your program will use num_list to produce another Python list, which we will refer to as cumulative_sum_list. These two lists are expected to have the same length, and the entries these two lists are related by: cumulative_sum_list[0] = num_list[0] cumulative_sum_list[1] = num_list[0] + num_list[1] cumulative_sum_list[2] = num_list[0] + num_list[1] + num_list[2] cumulative_sum_list[3] = num_list[O] + num_list[1] + num_list[2] + num_list[3] and so on. Note that you can realise your program with a for-loop. As an example, num_list = [1.5, 2.4,6.5] should return cumulative_sum_list = [1.5, 3.9, 10.4]. If you have difficulty, think about the problem of summing up a sequence of numbers in your head, which you did in the lecture. For the problem in the lecture, you were only interested in summing up all the numbers in the sequence. However, here, you also want the intermediate results too

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Michael V. Mannino

4th Edition

0615231047, 978-0615231044

More Books

Students also viewed these Databases questions

Question

Define marketing.

Answered: 1 week ago

Question

What are the traditional marketing concepts? Explain.

Answered: 1 week ago

Question

Define Conventional Marketing.

Answered: 1 week ago

Question

Define Synchro Marketing.

Answered: 1 week ago