Giter Club home page Giter Club logo

python-tip-calculator's Introduction

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

python-tip-calculator's People

Contributors

nadinejackson1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.