1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Flauer [41]
3 years ago
12

In Coral programming: A half-life is the amount of time it takes for a substance or entity to fall to half its original value. C

affeine 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 18 hours.
Ex: If the input is 100, the output is:

After 6 hours: 50.0 mg
After 12 hours: 25.0 mg
After 18 hours: 12.5 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.
Computers and Technology
1 answer:
viva [34]3 years ago
7 0

Answer:

Yes, it will be after 6 hours: 50 mg, after 12 hours: 25 mg, and after 18 hours: 12.5 mg

Explanation:

Remember coral is a functional programming language and follows Pythons functional programming paradigm. Remember Python supports functional, imperative as well as OOPS paradigm.

The function will be:

def void calcamtleft(int amt):

   integer a=6

   integer time=6

   integer i=1

   while amt> 0:

       amt=amt/2

       print("After"+time+"  hours:" +amt+"mg")

       i++

       time=a* i

Hence in first loop amt=100

new amt=100/2=50

After 6 hours: 50 mg ( this will be printed)

i will increment then, and time will be = 6 *2 =12

now input amt=50

new amt=50/2=25

After 12 hours 25 mg (this will be output)

i will increment then, and time will be = 6 *3 =18

now input amt=25

new amt=25/2=12.5

After 18 hours 12.5 mg (this will be output)

i will increment then, and time will be = 6 *4 =24

now input amt=12.5/2= 6.25

new amt=6.25/2= 3.125

After 24 hours 3.125 mg (this will be output)

i will increment then, and time will be = 6 *5 =30

now input amt=3.125

new amt=3.125/2= 1.5625

After 30 hours 1.5625 mg

And this will continue till amt>0

You might be interested in
Write a function sumOfMultiples, that inputs two integers - seed and cap. The function should return the sum of all the multiple
ryzh [129]

Answer:

HUHUHU+×÷OLOLOLOLO = i dont know

6 0
2 years ago
Naseer has inserted an image into his document but needs the image to appear on its own line.
Natalija [7]
I don't know if this will answer your question, however, if using Google Docs, it is as simple as selecting the line you wish the image to be on, and navigating to the insert tab. Located in the INSERT tab, there should be a Image button. Click that, and either upload from the web, or from your device.
8 0
2 years ago
Read 2 more answers
Henri is working in a complex financial spreadsheet that has hundreds of columns of data. If he is at column AN and would like t
Alisiya [41]
Answer: Contro; + Home

This key combination will return you to the first row, first column of the current worksheet.
8 0
3 years ago
The columns of a spreadsheet data source are A. form letters. B. the mailing list. C. data points. D. fields.
mojhsa [17]

I believe it is C, I'm so sorry if im incorrect.

8 0
2 years ago
What unit is used to describe the smallest amount of bitcoin?
diamong [38]

Answer:

The satoshi is currently the smallest unit of the bitcoin currency recorded on the block chain. It is a one hundred millionth of a single bitcoin (0.00000001 BTC).

Explanation:

A bitcoin is a type of digital currency in which a record of transactions is kept and new units of currency are generated by the computational solution of mathematical problems. Bitcoins operate independently through a central bank.

7 0
2 years ago
Other questions:
  • Jason is creating a web page for his school's basketball team. He just finished creating his storyboard. Which tool should he us
    7·1 answer
  • Utilities software and word processing software are both eamples of
    10·1 answer
  • What is the opportunity cost of computers when moving from point A to point B? -15 DVDs b. What is the opportunity cost of compu
    13·1 answer
  • Whats the Sioux City school wifi?
    15·2 answers
  • A light or optical microscope most commonly used is called a(n) _____. bright-field microscope dark-field microscope electron mi
    8·2 answers
  • Concerning Structured Cabling, select the statement that is true, or select, "All statements are false."
    5·1 answer
  • Assume phrase= "Peter Piper picked a peck of pickled peppers", What will be returned if phrase.search(/[aeiou]/) is called?
    9·1 answer
  • Using ________ as a promotion method will bring return visitors to your site.
    8·1 answer
  • Which image file format is the best format to use for photographs on the Web
    15·1 answer
  • Unconformities develop when new sedimentary layers accumulate atop old, eroded layers, resulting in a geologic hiatus. Which of
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!