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.
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.
Next was to output the result of each variable
This was the final result
#WSQ03 – Fun with Numbers by kevingmcc is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.