![]() |
| | #1 |
| Registered User Join Date: Dec 2002
Posts: 409
| AckUberPhest Your demented programming challenge is to determine how much alcohol someone can have. 1. Given their weight 2. Given the amount of alcohol. 3. Given the proof or alcohol content i.e 12oz bier at 3% 4. Determine their legal limit at .10 example run of prog. 1. Enter weight in lbs > 98 2. Enter Alcohol container size in oz > 12 3. Enter percent or proof per alcohol container > 3% <or enter> 6 proof answer> A 98 lbs drinker can have 2 bier of 12oz at 3% alcohol content. And will be at .11 level above the legal limit. October Fest .Prog Have fun with it. Please try to base the calculations on real world physics. Remember do not drink and program. You do not want to crash your computer. |
| kryptkat is offline | |
| | #2 |
| The superheterodyne. Join Date: Dec 2005 Location: Ireland
Posts: 2,205
| How will we calculate it if we're talking about a 150 Kg male alcoholic, with a liver like an ox (I don't know how much ox drink to be honest, but if they could ...), who has drunk at least 1.4 L of 12 year old Whiskey every day for 23 years?? I guess we, as the contestants, have to figure this out :/
__________________ I blag! |
| twomers is offline | |
| | #3 | ||
| Just Lurking Join Date: Oct 2002
Posts: 4,990
| Yes, some liver factor should be introduced, along with a time frame (6 beers one per hour for 6 hours vs 6 beers in 10 minutes -- different results). Isn't the average liver supposed to be able to process like 1 alcohol "serving" per hour? [edit]http://www.healthchecksystems.com/alcohol.htm Quote:
Quote:
__________________ 7. It is easier to write an incorrect program than understand a correct one. 40. There are two ways to write error-free programs; only the third one works.* Last edited by Dave_Sinkula; 10-01-2006 at 06:07 PM. Reason: Found some info. | ||
| Dave_Sinkula is offline | |
| | #4 |
| The superheterodyne. Join Date: Dec 2005 Location: Ireland
Posts: 2,205
| Yes. Over what amount of time is the alcohol consumed. Suggested reading towards the project - http://en.wikipedia.org/wiki/Alcohol_consumption and to a lesser extent http://uncyclopedia.org/wiki/Beer >> What!?!! Most of my posts would be gone. And you may forget to watch me very closely! ... I've heard that apparently when you drink less, you're more coherent. ... more importantly though ... >> Remember do not drink and program. You do not want to crash your computer. Or more likely, crash into your computer
__________________ I blag! |
| twomers is offline | |
| | #5 |
| Registered User Join Date: Dec 2002
Posts: 409
| I hope that this challenge would be a real world app that you or someone could actually use. Inspired by the movie “October Fest”. I knew there was a time factor and a food consumption factor that affects the calculations or victims state of being <read drunkenness> . There is more to a real world app than just the code. It is getting or figuring out how to do the calculations. Because you can not just say ten percent of a hundred pound person can have ten pounds of alcohol. The calculations are not that simple.<and that way would be wrong> There is more to it. It does look simple at first. The end goal is to figure out how much alcohol someone can have. |
| kryptkat is offline | |
![]() |
| Thread Tools | |
| Display Modes | |
|