Skip to content

kasey-okm/calculate_discount

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Calculate Discount

This Python script calculates the final price of an item after applying a discount.
If the discount percentage is 20% or higher, the discount is applied; otherwise, the original price is returned.

Usage

  1. Run the script:
    python calculate_discount.py
  2. Enter the original price when prompted.
  3. Enter the discount percentage when prompted.
  4. The script will display the final price after applying the discount, or the original price if the discount is less than 20%.

Example

Enter the original price: 100
Enter the discount percentage: 25
Final price after 25.0% discount: 75.00

Error Handling

  • If you enter a non-numeric value, the script will display an error message.

Requirements

  • Python 3.x

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages