Question 11
Calculate x(x+y)/y^2-1
Code:
# Get x
x = float(input("Please Enter a Value for X"))
# Get y
y = float(input("Please Enter a Value for Y"))
# Calculate top of fraction
a = x*(x+y)
# Calculate bottom of fraction
b = y^2-1
# Calculate Answer
ans = a / b
# Print product
print("x(x+y)/y^2-1 = ", ans)