Question: ( 2 0 pts ) Swift functions can be nested. Nested functions have access to variables that were declared in the outer function. You can

(20 pts) Swift functions can be nested. Nested functions have access to variables that were declared
in the outer function. You can use nested functions to organize the code in a function thats long or
complex.
Create a function modifyNumbers with two input parameters, integers number1 and number2. This
function will calculate the variable number =3*(number1+ number2). Then, create and call a
nested function multiplyByTen, which multiplies the variable number by 10. Next, return the result.
Test the function modifyNumbers using arguments number1=3 and number2=5. The following is
the expected result.IT 358 Assignment 01: Q1(Your Name)
The minimum score is: 62.5
The maximum score is: 98.5
The average score is: 82.53999999999999
The number of scores is: 5
 (20 pts) Swift functions can be nested. Nested functions have access

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!