Question: Alcohol is a drug that is processed by the body in a relatively predictable way. Because alcohol can impair an individual's driving, in Australia you

Alcohol is a drug that is processed by the body in a relatively predictable way. Because alcohol can impair an individual's driving, in Australia you are not legally allowed to drive unless your blood alcohol level (BAL) is below 0.05%. It takes approximately one hour for your BAL to decrease by 0.015. 


1. Implement in Python a function, hours to legal limit (bal), that takes an individual's current BAL and returns an integer representing the number of hours that individual must wait before they can legally drive, rounded to the larger number (we want to be on the safe side!). You must use either a for-loop or a while-loop inside your function. The function can be handwritten. 


2. Explain why you chose to use one kind of loop instead of the other kind. The explanation can be short, but it must be meaningful.

Step by Step Solution

3.37 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1Heres a simple implementation of the function in Python Pytho... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!