May-21-2020, 01:20 PM
To clarify, it's not the extra parentheses that are the problem, but what's included in the parentheses. In your first example, the extra parentheses are irrelevant because num_burgers is the only thing inside the parentheses, so float() is still being applied to the variable num_burgers:
str(float((num_burgers)))But in your original code, the float() is being applied to the expression "(num_burgers) * (float(cost_burgers))" rather than the num_burgers variable itself:
float((num_burgers) * (float(cost_burgers)))