Fun with Numbers (Function) – WSQ08

Fun with Numbers (Function) – WSQ08

First, you need to define the function, and state the variables you’re gonna use in parenthesis, they have to be different from the ones you’re gonna use to ask the user the value of these, then you do the operation under another variable, when you are done with this, type return and the name of the variable that contains said operation. You must do this for every function you create.

After that, ask for the original variables, the ones that are supposed to be different from the ones you initially did the function(s) with, create one last variable that will be equal to the name of the function you want, finally print the result using the variable you just created, which contains/is equal to the function.

Github code link.

Fun with Numbers (Function) – WSQ08

CC BY 4.0 Fun with Numbers (Function) – WSQ08 by tywins is licensed under a Creative Commons Attribution 4.0 International License.

Comments are closed.