python
Given:
x = 3 y = 2
Evaluate the following expression to a single numeric answer:
(x + y) // x
Step 1) Substitute in the values
Step 2) Perform the operation of highest precedence
Step 3) Final answer
Hello Student,
After execution of the given expression we get:
(x + y) // x = 1
Because " // " refers to Floor Division.
The proper code for the given value to evaluate the output of expression is:
CODE:
#Defiend the given values to x and y.(Step 1)
x = 3
y = 2
# Evaluating the value for the expression given.(Step 2)
expression = (x + y) // x
# printing statement with the output value.(Step 3)
print("Output value of the expression is ", expression)
OUTPUT:
---------------------------------------------------------------------------------------------------------------------------------------------------------
THANK YOU!
LIKE THE ANSWER IF IT HELPED YOU
Get Answers For Free
Most questions answered within 1 hours.