Tip Calculator Programs

December 06, 2019

To keep in practice with programming, I looked up programming samples and seen the Tip Calculator as a sample project that showed up on several programming practice lists. I did some feature creep on the idea to include more items. This way it wasn’t the same tip calculator that is seen everywhere and that would be created in most classes. Those features include: if more than one person is splitting the tip and then if they were all going to split the bill. I created the application in two different programming languages, Visual Basic, and the other as a Web Application using HTML, CSS, and JavaScript.

The app will take the amount of the bill, multiples that with the tip percentage to get the full amount of the tip. It will do two math equations: divide the tip by the number of people, then in another variable adds the total tip to the amount of the bill and divides that by the number of people. The totals of those two will then be rounded up to the nearest cent. It will then display the three totals: Bill Cost, Tip Amount, and Grand Total per person. If no people are added to the splitting of the bill, only tip amount and total will show. If there is no amount or no service selected, then an error message will be displayed.

You can download and play with the Visual Basic program here:
https://www.lynnamacher.com/programs/BillCalculator.exe.zip

Link to codepen for the web app version:
https://codepen.io/amacher13/pen/ZEzNJbo

 

Related Articles

Stand-alone app with PyInstaller

Stand-alone app with PyInstaller

Last post I’ve build a GUI calculator from an online class and added some extra functions to it. This post I’ll be creating the app as a stand-alone app for Mac and one for Windows. I’m using PyInstaller to do this, this is a stand-alone app you use in the command...

read more
GUI Python Calculator with Tkinter

GUI Python Calculator with Tkinter

This project started with me wanting to learn a way to make an app in Python with a Graphic User Interface (GUI). GUI is what people are used to seeing when working with a computer. The previous scripts I have done in Python have all been command line interface where...

read more
Archive Project part 2 – The Program

Archive Project part 2 – The Program

The second part of the archive project See Post 1 about the Mac OS side of the fixes here and for the purpose of this project. What the program needs to do: The program is to add extensions to the files that need them and clean out the files that don’t need to be...

read more

Pin It on Pinterest

Share This