17_blood_alcohol_calculator.rb
# Problem: Create a program that prompts for your weight, gender, number of drinks, the amount of alcohol by volume of the drinks consumed, and the amount of time since your last drink. Calculate your blood alcohol context (BAC) using this formula.
Create a program that prompts for your weight, gender, number of drinks, the amount of alcohol by volume of the drinks consumed, and the amount of time since your last drink. Calculate your blood alcohol context (BAC) using this formula.
Create a program that prompts for your weight gender number of drinks the amount of alcohol by volume of the drinks consumed and the amount of time since your last drink . Calculate your blood alcohol context ( BAC ) using this formula .
def main_program
  weight = asks_question("Please input your body weight in pounds:")
  gender = asks_question("Please input your gender as Female or Male:")
  drinks = asks_question("Please input the number of drinks you've consumed:")
  volume = asks_question("Please input the amont of alcohol by volume of the drinks consumed:")
  last_drink = asks_question("Please input the amount of time since your last drink in minutes:")
  gender = gets_gender(gender)
  person1 = BloodCalculator.new(weight, gender, drinks, volume, last_drink)
  bac = person1.bac_calculator(volume, weight, last_drink) 
  displays_bac(bac)
  if bac <= 0.08
    displays_message("It is legal for you to drive.")
  else
    displays_message("Its is not legal for you to drive.")
  end
end
def main_program weight = asks_question ( "Please input your body weight in pounds:" ) gender = asks_question ( "Please input your gender as Female or Male:" ) drinks = asks_question ( "Please input the number of drinks you've consumed:" ) volume = asks_question ( "Please input the amont of alcohol by volume of the drinks consumed:" ) last_drink = asks_question ( "Please input the amount of time since your last drink in minutes:" ) gender = gets_gender ( gender ) person1 = BloodCalculator . new ( weight , gender , drinks , volume , last_drink ) bac = person1 . bac_calculator ( volume , weight , last_drink ) displays_bac ( bac ) if bac <= 0.08 displays_message ( "It is legal for you to drive." ) else displays_message ( "Its is not legal for you to drive." ) end end
Problem: Create a program that prompts for your weight, gender, number of drinks, the amount of alcohol by volume of the drinks consumed, and the amount of time since your last drink.
Problem : Create a program that prompts for your weight gender number of drinks the amount of alcohol by volume of the drinks consumed and the amount of time since your last drink .
#giving an error message of wrong number of arguments