15.6. ExercisesΒΆ

    1. Fill in the parameter list for g so that the invocations of g yield the return values specified

    1. Define a function called nums that has three parameters. The first parameter, an integer, should be required. A second parameter named mult_int should be optional with a default value of 5. The final parameter, switch, should also be optional with a default value of False. The function should multiply the two integers together, and if switch is True, should change the sign of the product before returning it.

    1. Write a function called together that takes three parameters, the first is a required parameter that is a number (integer or float), the second is a required parameter that is a string, and the third is an optional parameter whose default is ” β€œ. What is returned is the first parameter, concatenated with the second, using the third.

15.6.1. Contributed ExercisesΒΆ

Q-1: After completing the reading, what concepts are still unclear to you? If nothing is unclear, what did you find most interesting?

You have attempted of activities on this page
Next Section - 15.7. Chapter Assessment