Skip to content

mamamia0729/python-tip-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Tiny Tip Calculator

This is a simple command-line Python program designed to calculate the total bill amount, including tip, and then split it among a specified number of people. It was created as a hands-on exercise to reinforce fundamental Python concepts.

Concepts Demonstrated:

  • Data Types: Utilization of float for monetary values and int for counting people.
  • Variables: Storing user inputs and intermediate calculation results.
  • Arithmetic Operators: Extensive use of +, -, *, / for calculations.
  • Operator Precedence: Ensuring correct order of operations in tip calculation.
  • Input/Output: Taking user input and displaying formatted results using input() and print().
  • Basic String Formatting: Using f-strings to present output clearly.

Potential Future Enhancements:

  • Add error handling for invalid input (e.g., non-numeric input).
  • Implement a loop to allow multiple calculations without restarting the script.
  • Offer an option for custom rounding.

About

A simple tip calculator in Python to practice basic concepts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages