Question: SELU -IET ET 202 Computer Applications Fall 2018 Q4. For 2 cycle engines, the fuel and gas need to be mixed with certain ratio (e.g.

SELU -IET ET 202 Computer Applications Fall 2018 Q4. For 2 cycle engines, the fuel and gas need to be mixed with certain ratio (e.g. 50 gas: 1 oil). If the amount of gas is given in gallons and fractions of gallons (e.g. 1.23 gal) and the oil is sold by fluid ounces (fl oz) and you are limited by certain container size to mix the gas and oil (say 1, 2 or 5-gal jugs). Create a script that asks the user about the ratio (fraction of gas & fraction of oil), the size of the mixing container (1, 2 or 5 gal), and outputs the amount of needed gas in gallons and the amount of needed oil in fl oz (I gal -128 fl oz) Write the code using for or while loop (use if, break, continue, if needed) Sample outputs: For a 1 g81 jug and 50:1 gas:oll ratio you need 0.9804 gal of gas and 2,5098 11 oz of oil For a 5 gal ug and 50:1 gassoil ratio you need 4.9020 gal of gas and 12.5490 1 0z of oil
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
