This should be in Python
Statement :
A lot of people drink and drive. The legal blood alcohol level is .08%. Blood alcohol level largely depends on an individual’s BMI and the percentage and amount of whatever it is they consumed. This program could potentially help users estimate how long to wait before driving, if they must drive.
Program Description
This program will:
Give the most recent statistics of drinking and driving in California. It will allow user to create an account. The program will also save the users name, weight, age, and height. It will give the user the option of adding an emergency contact. Program will prompt user for what type of alcohol they are consuming as well as the oz and percentage of alcohol in that drink. The program will use that data to calculate how many drinks they can have to stay under the .08%. If the program estimates that they could be over the alcohol level, it will warn the user. The warning will include links to driving services such as Uber, Lyft, etc. And it will give the user the option to generate a message to their emergency contact.
def problemfour():
try:
gender = int(input("What
is your gender? Enter 1 for Male, 0 for Female"))
weight = int(input("What
is your weight?"))
drinks = int(input("How
many drinks have you had?"))
volume = int(input("What
is the alcohol by volume per drink (in oz)?"))
time = int(input("When
was your last drink(in hours)"))
except ValueError as e:
print("You have entered
an incorrect value. ")
total_alcohol = drinks * volume
#The below changes the ratio depending on if the
user is a male or female.
if gender == 1:
ratio = 0.73
else:
ratio = 0.66
bac = round((total_alcohol * 5.14 / weight *
ratio) - 0.015 * time, 3)
#The below is used to create only 1 output
statement.
if bac >= 0.08:
variable = "not "
else:
variable = ""
print("Your BAC is {}".format(bac))
print("It is {}legal for you to
drive".format(variable))
This should be in Python Statement : A lot of people drink and drive. The legal blood alcohol lev...
This should be in Python Statement : A lot of people drink and drive. The legal blood alcohol level is .08%. Blood alcohol level largely depends on an individual’s BMI and the percentage and amount of whatever it is they consumed. This program could potentially help users estimate how long to wait before driving, if they must drive. Program Description This program will: Give the most recent statistics of drinking and driving in California. It will allow user to create...
The legal blood alcohol level is .08%. Blood alcohol level largely depends on an individual’s BMI and the percentage and amount of whatever it is they consumed. Create a program that could potentially help users estimate how long to wait before driving, if they must drive. Program Description This program will will allow user to create an account. The program will also save the users name, weight, age, and height. It will give the user the option of adding an...
The world’s 3 billion-plus smartphones emit the kind of data that health authorities covet during outbreaks. They show where individuals are, where they’ve been and who they might have talked to or even touched — potentially offering maps to find infected people and clues to stopping new ones. But gaining access to this data, even amid a global pandemic, is made complex by the legal and ethical issues surrounding government access to information that can reveal intimate details about citizens’...
Risk management in Information Security today Everyday information security professionals are bombarded with marketing messages around risk and threat management, fostering an environment in which objectives seem clear: manage risk, manage threat, stop attacks, identify attackers. These objectives aren't wrong, but they are fundamentally misleading.In this session we'll examine the state of the information security industry in order to understand how the current climate fails to address the true needs of the business. We'll use those lessons as a foundation...
SYNOPSIS The product manager for coffee development at Kraft Canada must decide whether to introduce the company's new line of single-serve coffee pods or to await results from the product's launch in the United States. Key strategic decisions include choosing the target market to focus on and determining the value proposition to emphasize. Important questions are also raised in regard to how the new product should be branded, the flavors to offer, whether Kraft should use traditional distribution channels or...
I have this case study to solve. i want to ask which type of case study in this like problem, evaluation or decision? if its decision then what are the criterias and all? Stardust Petroleum Sendirian Berhad: how to inculcate the pro-active safety culture? Farzana Quoquab, Nomahaza Mahadi, Taram Satiraksa Wan Abdullah and Jihad Mohammad Coming together is a beginning; keeping together is progress; working together is success. - Henry Ford The beginning Stardust was established in 2013 as a...