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 or oO the program should display an error
message, as shown in Test
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 litrescase
Oil costs the station $ per litre before discounts.
If the station purchases more than cases, they receive a discount off the
per litre price of the purchase.
Gasoline is purchased by the litre at a cost of $ per litre.
If the station purchases more than litres, they receive a discount off
the per litre price.
Calculate GST according to the following table:
The user can type the province in loweror uppercase letters.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
