question # 5\nmultiple select\nassume you previously entered these lines of code.\n>>> a = 3\n>>> b = 2\n>>>…

question # 5\nmultiple select\nassume you previously entered these lines of code.\n>>> a = 3\n>>> b = 2\n>>> c = 0\nwhich lines of code below generate errors? select 2 options.\nresult = ab + bc\nresult = a * b - b / (c + b)\nresult = a * b - b / c\nresult = a * b - c / b\nresult = a * b - c / (a + c)

question # 5\nmultiple select\nassume you previously entered these lines of code.\n>>> a = 3\n>>> b = 2\n>>> c = 0\nwhich lines of code below generate errors? select 2 options.\nresult = ab + bc\nresult = a * b - b / (c + b)\nresult = a * b - b / c\nresult = a * b - c / b\nresult = a * b - c / (a + c)

Answer

Explanation:

Step1: Analyze first option

In Python, ab and bc are not defined variables. The correct way to multiply variables is a*b and b*c. So result = ab + bc will generate a NameError.

Step2: Analyze second option

result = a * b - b / (c + b) has c + b = 0+2=2, and no division - by - zero or other errors. It is a valid expression.

Step3: Analyze third option

Since c = 0, the expression result = a * b - b / c has a division - by - zero operation. In Python, dividing by zero raises a ZeroDivisionError.

Step4: Analyze fourth option

result = a * b - c / b has c / b=0 / 2 = 0, and it is a valid expression.

Step5: Analyze fifth option

result = a * b - c / (a + c) has a + c=3 + 0=3, and c / (a + c)=0/3 = 0, and it is a valid expression.

Answer:

result = ab + bc, result = a * b - b / c