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
Para que se utiliza openoffice en la vida cotidiana?
Mama L [17]
OpenOffice se utiliza para organizar y presentar los datos o la información de otra manera.

espero y te ayude! : )
3 0
3 years ago
Read 2 more answers
For this exercise, you are going to create a part of an Animal hierarchy. Unlike some of our examples and the previous exercises
kati45 [8]

Answer:

vehicle super class 9.1.4

Explanation:

So you need to create a super class containig all the animals use the class above for referance

5 0
3 years ago
Which is the best method of marketing a game to casual players?
Phoenix [80]
A casual game is a video game targeted at or used by casual gamers. Casual games may exhibit any type of gameplay or genre. They are typically distinguished by simple rules and by reduced demands on time and learned skill, in contrast to more complex hardcore games. They typically impose low production and distribution costs on the producer. Casual games are often played on a personal computer online in web browsers, but are also popular on game consoles and mobile phones.

Hope this helped. Have a great day! :D
3 0
3 years ago
Read 2 more answers
Which method is useful for dimensionality reduction especially for small data-sets?
Anna [14]
Independent Component Analysis (ICA) is based on information-theory and is also one of the most widely used dimensionality reduction techniques.
8 0
2 years ago
General Hardware Products Your boss, the IT director, wants you to explain FDDs, BPM, DFDs, and UML to a group of company manage
Bas_tet [7]

Answer:

1. FDD is a process and Analysts can use a FDD to create and use business functions and processes. It Requirements models are used when gathering requirements for a new system.

2. BPM is used on an ongoing basis for business process improvement. It is meant to improve order, insight and efficiency of the collective workflows that make up any given business process. BPM is meant to reduce any chaos within those collective workflows that make up a process and eliminate ad hoc workflow management. BPM means Business Process Management.

3. DFDs stands for Data Flow Diagram which will help software developers and designers to understand how they can take their next step to fit into the overall business process. DFDs paly key role for a successful requirements modeling.

4. UML can be used for modeling a system independent of a platform language. UML is a graphical language for visualizing, specifying, constructing, and documenting information about software-intensive systems. UML gives a standard way to write a system model, covering conceptual ideas.

Explanation:

Functional decomposition diagram (FDD) is used to identify functions and define their structure. It is a technique to decompose the complex problem into manageable pieces or individual elements to develop the application or product.

DFDs: It contains a process (shape) that represents the system to model, in this case, the "Food Ordering System". It also shows the participants who will interact with the system, called the external entities. In this example, Supplier, Kitchen, Manager and Customer are the entities who will interact with the system.

Unified Modeling Language (UML): Edraw UML Diagram is the application of choice for many software engineers and designers. The software is fully compatible with 64 and 32-bit Windows platforms from Windows XP to Windows 10.

3 0
3 years ago
Other questions:
  • Failure to verify information can lead to?
    10·1 answer
  • Peter has a website that promotes his local vacation rental site. He uses Google Ads to manage his advertising campaign. He’s cr
    13·1 answer
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • The function below takes two numeric parameters. The first parameter specifies the number of hours a person worked and the secon
    13·1 answer
  • Choose and explain, step by step, one method of backing up student files either manually or using a cloud service.
    10·1 answer
  • Please help with coding assignment.
    11·1 answer
  • 1. What year was the Entertainment Software Rating Board created?
    15·1 answer
  • The software concept ___________and defines a need for the new system.
    6·1 answer
  • The term information technology was first used what year?
    15·2 answers
  • Ninety percent of the fastest-growing jobs require some kind of postsecondary education.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!