Objective
Create a Python program that requests an integer x from the user and print the result of the following operations:
- -6 + x * 5
- (13-2) * x
- (x + -2) * (20 / 10)
- (12 + x) / (5 - 4)
Instructions
- Request an integer
xfrom the user. - Calculate the result of the first expression.
- Calculate the result of the second expression.
- Calculate the result of the third expression.
- Calculate the result of the fourth expression.
- Print the results of each expression on separate lines.
2
4
22
0.0
14.0
Open the editor in full screen: the statement on the left and your code, the output and the tests on the right.
Start exercise