AckUberPhest

This is a discussion on AckUberPhest within the Contests Board forums, part of the Community Boards category; AckUberPhest Your demented programming challenge is to determine how much alcohol someone can have. 1. Given their weight 2. Given ...

  1. #1
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638

    AckUberPhest

    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.

  2. #2
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    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 :/

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    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
    The liver is able to metabolize about ˝ ounce of ethanol per hour (approximately one drink, depending on a person’s body size, food intake, etc.).
    [/edit]
    Quote Originally Posted by kryptkat
    Remember do not drink and program.
    What!?!! Most of my posts would be gone.
    Last edited by Dave_Sinkula; 10-01-2006 at 07:07 PM. Reason: Found some info.
    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.*

  4. #4
    The superhaterodyne twomers's Avatar
    Join Date
    Dec 2005
    Location
    Ireland
    Posts
    2,262
    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

  5. #5
    Registered User kryptkat's Avatar
    Join Date
    Dec 2002
    Posts
    638
    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.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21