#WSQ03 – Fun with Numbers

In this task I had some small difficulties. First of all this was the first time I actually ask the user for input in python, so I went and asked my best friend Google. After a few minutes searching the web I found out that python has a keyword called ‘input’.

The second challenge was to make sure that the user’s input was a number and not a string , so I found out that there is another keyword in python called ‘int’ and goes really well with the ‘input’ keyword. With these two keywords I discovered how to ask the user for to numbers and store them into two separate variables.

Screen Shot 2016-02-17 at 8.50.27 PM

The next step to the task was to calculate the difference between the two numbers, the multiplication, the division and the remainder. It was easy just to store the values into  different variables.

Screen Shot 2016-02-18 at 12.09.56 PM

Next was to output the result of each variable

Screen Shot 2016-02-18 at 12.14.22 PM

This was the final result

Screen Shot 2016-02-18 at 12.15.44 PM

CC BY-SA 4.0 #WSQ03 – Fun with Numbers by kevingmcc is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.