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
A client has macular degeneration resulting in moderate visual impairment. The client works as a data entry clerk and wants to c
weqwewe [10]

Answer:

Low Vision Aid for Computer Users

Explanation:

Visually impaired people can use the same low vision aids for viewing a computer screen as they do for regular reading activities. These include eyeglass-mounted magnifiers, handheld magnifiers and stand-alone magnifiers.  But also, special software has been developed to display content on the screens of computers and other digital devices in large print. Other applications can read text and other visual content aloud with a synthetic voice.  These adaptive low vision devices let partially sighted people do the same computer-related tasks as fully sighted people — such as word processing, creating and using spreadsheets and viewing web pages online.

4 0
2 years ago
A _______________ is a field that contains data unique to a record.
Andru [333]

A primary key is a field that contains data unique to a record

8 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
diamong [38]
The answer is handouts.
A handout is a pamphlet with information on your presentation you can give to your audience
8 0
3 years ago
In order to prevent ports that are serving network hosts from being considered as best paths, what should be enabled to block bp
Sergio039 [100]

In order to prevent ports that are serving network hosts from being considered as best paths, BPDU guard should be enabled to block bpdus.

<h3>What are BPDU used for?</h3>

A bridge protocol data unit (BPDU) is known to be a kind of a data message that is known to be often  transmitted in a local area network to be able to know or find loops in that given network topologies.

Hence, in the case above, In order to prevent ports that are serving network hosts from being considered as best paths, BPDU guard should be enabled to block bpdus.

See full question below

. In order to prevent ports that are serving network hosts from being considered as best paths, what should be enabled to block BPDUs?

a. BPDU filter

b. BPDU guard

c. root guard

d. BPDU drop

Learn more about ports from

brainly.com/question/10097616

#SPJ1

6 0
1 year ago
How to make a cartoon can we use adobe flash
zvonat [6]
Yes you can use adobe flash to make a cartoon
4 0
3 years ago
Read 2 more answers
Other questions:
  • A job application is a form used to make a job request.<br> True<br> False
    8·2 answers
  • What protects original and creative expression of an idea?
    6·2 answers
  • A technology company only hires applicants who are under the age of 30. This company could face possibly _________ consequences
    9·2 answers
  • Can a computer will work more efficiently if you perform disk optimization
    9·1 answer
  • ________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
    11·1 answer
  • Which of the following describe a required
    7·1 answer
  • To print a range of cells in the active worksheet, click ____ in the settings area in the print gallery.
    14·1 answer
  • doubleIt is a function that takes one argument and returns no value . The argument is a pointer to int . The function doubles th
    9·1 answer
  • Muultimedia Promo try answer this question and explaining them or give examples of that topic Thanks
    10·1 answer
  • Write a program, TwoDimentionalGrid. Ask the user to enter the size of the 2 dimensional array. Here we are not doing any input
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!