Final answer:
To write a Python script that reads two integer numbers and an arithmetic operator and displays the computed result, you can follow these steps: get the numbers and operator from the user, perform the desired operation, and display the result.
Step-by-step explanation:
To write a Python script that reads two integer numbers and an arithmetic operator and displays the computed result, you can use the following steps:
- Get the first number from the user using the int(input('Enter first number: ')) function and store it in a variable.
- Get the second number from the user using the int(input('Enter second number: ')) function and store it in another variable.
- Get the arithmetic operator from the user using the input('Enter arithmetic operator: ') function and store it in a variable.
- Perform the arithmetic operation based on the operator entered by the user. For example, if the operator is '+', you can use result = num1 + num2, if the operator is '-', you can use result = num1 - num2, and so on.
- Display the computed result using the print() function.