Skip to content

ndalbah/Python_GasStation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Python - Gas Station Project

A gas station is selling fuel with the following discount table:

  • Diesel:
    • Up to 20 liters.
    • 3% discount per liter over 20 liters.
    • 5% discount per liter.
  • Gasoline:
    • Up to 20 liters.
    • 4% discount per liter over 20 liters.
    • 6% discount per liter.

Write an algorithm that reads the number of liters sold, the type of fuel (coded as follows: D-diesel, G-gasoline), calculates and prints the amount to be paid by the customer knowing that the price of a liter of Gasoline is CAD$ 2.50 the price of a liter of Diesel is CAD$ 1.90.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages