Skip to content

nadinejackson1/python-tip-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

100 Days of Machine Learning-Day2

Basic Python Concepts - Simple Tip Calculator 💡🧮

It's important to note that the challenge I created does not specifically call for the Tip Calculator as a project. Day 2 Challenge is to "Learn basic Python programming concepts, then practice by creating a simple Python script and uploading it to your GitHub repository." I chose to create a calculator as my Day 2 project.

Description 📝

A user-friendly Python script to calculate how much each person should pay when splitting a bill with tip included.

Features 🌟

  • Takes bill amount, desired tip percentage, and number of people as inputs
  • Calculates individual share based on provided information
  • Displays the final amount each person should pay

How to Use 🚀

  1. Run the script using Python
  2. Enter the total bill amount
  3. Enter the desired tip percentage (10, 12, or 15)
  4. Enter the number of people splitting the bill
  5. The script will display the amount each person should pay, including the tip

Variables and Functions 📚

  • bill: total bill amount
  • tip: desired tip percentage
  • people: number of people splitting the bill
  • tip_as_percent: tip percentage as a decimal
  • total_tip_amount: total tip amount for the bill
  • total_bill: total bill amount including the tip
  • bill_per_person: individual share of the total bill
  • final_amount: formatted individual share, rounded to 2 decimal places

About

A simple tip calculator using Python

Topics

Resources

Stars

Watchers

Forks

Languages