Skip to content

chandukh2006/python0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Python Calculator & Receipt Generator

Overview

This project features a basic Python script designed to function as a calculator and receipt generator. It allows users to input prices for various items, calculates the total amount, and generates a simple receipt displaying the final bill. This tool is useful for basic financial calculations and generating a receipt for purchases.

Features

  • Dynamic Calculation: Continuously updates the total amount as item prices are entered.
  • Interactive User Interface: Command-line interface that prompts users for item prices and displays the running total.
  • Receipt Generation: Provides a final total and a thank-you message when the user decides to quit.
  • Error Handling: Alerts the user if an invalid input is provided and prompts for a valid number or 'q' to quit.

Prerequisites

  • Python 3.x: Ensure Python 3.x is installed on your system as the script is compatible with Python 3.
  • Basic Python Knowledge: Understanding of how to run Python scripts from the command line.

Installation

  1. Clone the repository:

    git clone https://github.com/chandukh2006/python0.git

  2. Navigate to the project directory:

cd python0

Usage

Run the Python script:

python3 python1.txt Follow the prompts to enter item prices. Type 'q' when finished to view the final bill.

Example interaction:

Enter the price (or 'q' to quit):

50

Order total so far: 50.00

Enter the price (or 'q' to quit):

25

Order total so far: 75.00

Enter the price (or 'q' to quit):

q

Your bill total is 75.00. Thanks for shopping with us.

Scripts Description

python1.txt: The Python script that calculates the total cost of items and generates a receipt. The script prompts the user for item prices and displays the cumulative total and final bill.

Example Output

Receipt Generation

Enter the price (or 'q' to quit):

100

Order total so far: 100.00

Enter the price (or 'q' to quit):

150

Order total so far: 250.00

Enter the price (or 'q' to quit):

q

Your bill total is 250.00. Thanks for shopping with us.

Contributing

Contributions are welcome! Please fork the repository and submit a pull request with your changes. Ensure that your code follows the existing style and passes all relevant tests.

Contact

For any questions or feedback, please open an issue in the repository or contact [email protected]

About

calculator and receipt generator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published