At first the system scan the first number and store it into the variable a. Then the second number is also scanned to a variable b. The user then asked to enter operations of their choice. According to the users choice, if-elif condition is executed.
