Here I am going to show you how I done the WSQ03. It is call “Fun with numbers”, and it is about making simple functions. I know, best day ever.

So here I’ll put an image about my program, and the I explain it:

wsq03

Gaze at the program, try to understand it and then read this:

First of all, I ask the user to enter two integer values, because that is what I need to run  the program.

Then (look at the program), I make some functions, like the sum, the difference, the product, the division and the last one, have a “%” sign, this means that the value that is going to be returned is the residual of the integer division of the two numbers (the first one over the second one).

Then I print the values on screen, in order to our user to see them, and also put a little explanation of what that value represents, because there is no point in just print numbers, no one would know from where they come from.

Okay… I think this is all for this one. If anyone have questions about how to done it, feel free to ask me.

The code for this WSQ is over here: https://github.com/hrglez/TC1017/blob/master/WSQ03%20-%20Numbers

CC BY 4.0 WSQ03, Having fun with numbers by hrglez is licensed under a Creative Commons Attribution 4.0 International License.