Skip to content

FMCovington/Whiskey2Wine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Author: F. M. (Mike) Covington (Feb. 2024)

Program Filename: whiskey_to_wine.py

(Programmer's Note: This is naive code, created on-the-fly for educational demonstration of concept purposes only. Still, my students and colleagues thought it clever, so here it is.) 😊

Description: Simple program that calculates the amount of any non-alcoholic beverage that must be added to any alcoholic beverage of known proof and volume to result in the same ABV% as wine.

Purpose: Demonstration of a pseudo-real-world application of the C₁V₁=C₂V₂ dillution formula.

Usage: Execute file and follow prompts. If no input or improper input is given, defaults of 80 proof and 1.5 oz will be used. -OR- Import the module whiskey_to_wine and execute the function whiskey2wine(proof, ounces).

A super simple unittest file is included to validate results given any and all realistic argument values.

Requires Python 3.8 or newer (in theory).