Question: Use if and elif statements only. Oil & Gas Station Scenario A gas station wants to write a program which is able to:

Use "if" and "elif" statements only.
Oil & Gas Station Scenario
A gas station wants to write a program which is able to:
Display the following menu:
G: Gas
O: Oil
Allow the user to select one of the above options. The user can type ( g or G ) and (o or O ).
If the user selects invalid option (not g/G or o/O), the program should display an error
message, as shown in Test 1.
Calculate the cost of their oil and gas purchases from their wholesaler, including any
discounts and GST. Calculation is based on the following business rules:
Oil must be purchased by the case. There are 12 litres/case.
Oil costs the station $1.25 per litre before discounts.
If the station purchases more than 6 cases, they receive a 10% discount off the
per litre price of the purchase.
Gasoline is purchased by the litre at a cost of $1.05 per litre.
If the station purchases more than 2000 litres, they receive a 10% discount off
the per litre price.
Calculate GST according to the following table:
The user can type the province in lower-or upper-case letters.
Use " if " and "elif" statements only. Oil & Gas

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!