A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with conversion apecifiers to output the caffeine amount as floating-point numbers. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 100 the output is: After 6 hours: 50.00 mg After 12 hours: 25.00 mg After 24 hours: 6.25 mg Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg. 312198 2042412.qx3zgy7
A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with conversion apecifiers to output the caffeine amount as floating-point numbers. Output each floating-point value with two digits after the decimal point, which can be achieved as follows: print('{:.2f}'.format(your_value)) Ex: If the input is: 100 the output is: After 6 hours: 50.00 mg After 12 hours: 25.00 mg After 24 hours: 6.25 mg Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer) has between 100 mg and 200 mg. 312198 2042412.qx3zgy7
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Help me figure this out. Thanks
![PTER AREVIEW OU
O Browsin X
zy Section X
O Safe Sea X
O how to
C Sign In
Content x
O what ar
A Read Al x
h OnTarge x
ead alo
CHCCCTI110Fall2021/chapter/9/section/14
OnTarget Login Steam
Intel zy zybooks © Google W Python - List Metho.
W Python
costella.green@yah.
O Self Service FTCC
b, Programming, Database Foundation home>
matted output: Caffeine levels
9.14 LAB: Input and formatted output: Caffeine levels
A half-life is the amount of time it takes for a substance or entity to fall to half its original value.
Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output
the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with conversion
apecifiers to output the caffeine amount as floating-point numbers.
Output each floating-point value with two digits after the decimal point, which can be achieved as
follows:
print('{:.2f}'.format(your_value))
Ex: If the input is:
100
the output is:
After 6 hours: 50.00 mg
After 12 hours: 25.00 mg
After 24 hours: 6.25 mg
Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer)
has between 100 mg and 200 mg.
312198.2042412 qx3zqy7
LAB
9.14.1: LAB: Input and formatted output: Caffeine levels
ACTIVITY
0/ 10
W](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb18a6d3b-799d-4c2e-b066-1a74de8e144c%2F4a2103ed-ce67-49da-b61a-3dfe38145eca%2Fhmrs88k_processed.jpeg&w=3840&q=75)
Transcribed Image Text:PTER AREVIEW OU
O Browsin X
zy Section X
O Safe Sea X
O how to
C Sign In
Content x
O what ar
A Read Al x
h OnTarge x
ead alo
CHCCCTI110Fall2021/chapter/9/section/14
OnTarget Login Steam
Intel zy zybooks © Google W Python - List Metho.
W Python
costella.green@yah.
O Self Service FTCC
b, Programming, Database Foundation home>
matted output: Caffeine levels
9.14 LAB: Input and formatted output: Caffeine levels
A half-life is the amount of time it takes for a substance or entity to fall to half its original value.
Caffeine has a half-life of about 6 hours in humans. Given caffeine amount (in mg) as input, output
the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with conversion
apecifiers to output the caffeine amount as floating-point numbers.
Output each floating-point value with two digits after the decimal point, which can be achieved as
follows:
print('{:.2f}'.format(your_value))
Ex: If the input is:
100
the output is:
After 6 hours: 50.00 mg
After 12 hours: 25.00 mg
After 24 hours: 6.25 mg
Note: A cup of coffee has about 100 mg. A soda has about 40 mg. An "energy" drink (a misnomer)
has between 100 mg and 200 mg.
312198.2042412 qx3zqy7
LAB
9.14.1: LAB: Input and formatted output: Caffeine levels
ACTIVITY
0/ 10
W
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question
use the following code:
print(f'{your_value:.2f}')
![A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in
humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with
conversion specifiers to output the caffeine amount as floating-point numbers.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print(f'{your_value:.2f}')](https://content.bartleby.com/qna-images/question/1c046fce-56df-4fb7-b9b2-2337f219da1b/19c10ba3-596d-4360-8d16-47db69b90d74/gpzctib_thumbnail.png)
Transcribed Image Text:A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-life of about 6 hours in
humans. Given caffeine amount (in mg) as input, output the caffeine level after 6, 12, and 24 hours. Use a string formatting expression with
conversion specifiers to output the caffeine amount as floating-point numbers.
Output each floating-point value with two digits after the decimal point, which can be achieved as follows:
print(f'{your_value:.2f}')
Solution
Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education