/python-mini-projects

I'm adding the practice coding exercise from 100 Days of Code: The Complete Python Bootcamp 2022

Primary LanguagePython

python-mini-projects

I'm adding the practice coding exercise from 100 Days of Code: The Complete Python Bootcamp 2022

Python Mini Projects

### Day 3

📝 Table of Contents

Usage

Following these instructions will give you a copy of this project and you can run it on your local machine.

Prerequisites

Python3

Cloning the repository

To clone this project use the folllowing command - git clone https://github.com/Veralee225/python-mini-projects.git

cd python-mini-projects

To access each of the files, example from day 1 `python3 1-day.py

Day 1

Band-name-generator

Day 2

Tip Calculator

Instructions

  • If the bill was $150.00, split between 5 people, with 12% tip.

  • Each person should pay (150.00 / 5) * 1.12 = 33.6

  • Format the result to 2 decimal places = 33.60

  • Thus everyone's share of the total bill is $30.00 plus a $3.60 tip.

  • Tip: There are 2 ways to round a number. You might have to do some Googling to solve this.💪

Example Input

  • Welcome to the tip calculator!
  • What was the total bill? $124.56
  • How much tip would you like to give? 10, 12, or 15? 12
  • How many people to split the bill? 7

Example Output

  • Each person should pay: $19.93

Hint

  • How to round a number to 2 decimal places in Python
  • How to limit a float to two decimal places in Python

Tip calculator

Day 3

  • Pizza order practice
  • love_calculator