Question
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 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 39Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started