Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The second function you will write should be called sumNumbers. Your function should take three ( 3 ) arguments: each one an integer between 0

The second function you will write should be called sumNumbers. Your function should take three (3) arguments: each one an integer between 0 and 100.

The function should return one (1) integer. The output integer shall be the sum of three lists of numbers. Each list will be defined by one of the input arguments as follows. If n is the value of an input argument, then the list corresponding to that input argument shall start with n and contain n elements. For example, if the first input argument contains 3, then the corresponding list shall be [3, 4, 5]; 2 yields [2, 3]; and 4 yields [4, 5, 6, 7].

Your function should build all three lists, corresponding to the three input variables, and return the sum of all the elements of all three lists.

Example Test Case:

sumNumbers(2, 3, 4) 

returns

39

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

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

How can stream analytics be used in e-commerce?

Answered: 1 week ago