Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The first function you will write should be called sumNumbers. Your function should take three input variables, each one an integer between 0 and 100.

image text in transcribedThe first function you will write should be called sumNumbers. Your function should take three input variables, each one an integer between 0 and 100. The function should return one output: an integer. The output integer shall be the sum of three lists of numbers. Each list will be defined by one of the input variables as follows. If n is the value of an input variable, then the list corresponding to that input variable shall start with n and contain n elements. For example, if the first input variable contains 3, then the corresponding list shall be [3, 4, 5]; 2 yields [2, 3]; and 4 yields [4, 5, 6, 7]. The first function should build all three lists, corresponding to the three input variables, and the return the sum of all the elements of all three lists. Example Test Case: sumNumbers(2,3,4) should return 39.

The first function you will write should be called 'sumNumbers'. Your function should take three input variables, each one an integer between 0 and 100. The function should return one output: an integer. The output integer shall be the sum of three lists of numbers. Each list will be defined by one of the input variables as follows. If n is the value of an input variable, then the list corresponding to that input variable shall start with n and contain n elements. For example, i contains 3, then the corresponding list shall be [3, 4, 5]; 2 yields [2, 3]; and 4 yields [4, 5, 6, 71. if the first input variable The first function should build all three lists, corresponding to the three input variables, and the return the sum of all the elements of all three lists. Example Test Case Page 3 of 5 CS 105 Intro to Computing Non-Tech Fall 2017 sumNumbers (2,3,4) should return 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

More Books

Students also viewed these Databases questions