Response:
steps = int(input("Specify the number of steps: "))
miles = steps / 2000
print('{:.2f}'.format(miles))
Explanation:
Prompt the user to input the number of steps and convert the input to an integer.
Compute the corresponding miles by dividing the number of steps by 2000.
Output the miles formatted to two decimal places.
The primary issue was declaring int prod within the while loop, which caused prod to reset to 1 each time the loop executed.
Answer:
Refer to the explanation
Explanation:
Number of Mobiles=x1
Number of Workstations=x2
Constraints:
50x1 + 70x2 <= 1,60,000
250x1 + 700x2 <= 12,000,000
x1 >= 0 x2 >= 0
Objective function N(x1, x2) = 7800000000 x1 + 7200000000 x2
Excel formulae:
G17 = D9 * E7 + F9 * G7
G18= D10 * E7 * F10 * G7
G19= E7
G20= G7
G21= I17 * E7 + I18 * G7 (This will yield the Maximum)
And E7 and G7 will be the solution.
Set up your sheet as shown in the diagram and apply the formulas.
Access the tool and select solver. Upon opening the Solver dialog, confirm ‘Assume Linear model’ and ‘assume non-negative’. Click to solve the model and keep the solution.
The answer can be found in the explanation section. For a detailed breakdown of each step, please refer to the comments.