Retired

How do I dilute this correctly? (retired)

Description:

#Background:

In molecular biology/pharmacology (and many branches of science) where we are testing whether a cell is sensitive to a drug, we often order in the drug or drug-like compound from a commercial supplier.

Unfortunately, the manufacturers usually ship the drug as a powder, but for us to use it in the lab, we need to resuspend/dissolve the powder in a liquid.

While we could measure the concentration of drug in liquid in 'normal' metric units such as g/ml, the difficulty is that commonly in science we don't..

Scientists like to use units of concentration called Molar, where

1 Molar (or 1M) = 1 mole/litre

1 mole is a special value equal to 6.022 * 10^23 molecules.

See this wikipedia article for more information.

To convert x grams of drug into moles we need to use the following formula:

n = m/MW

where:

  • n = number of moles
  • m = mass in grams
  • MW = molecular weight (in moles/gram)

Once we have n, we can use the following formula to determine the concentration and for a given volume to dissolve in.

C = n/V

For the purposes of this exercise say we always dissolve at 10mM

Once we have our drug dissolved we can then dilute to an appropriate usage concentration, which may be orders of magnitude lower (eg. 1nM)

To do this use the formula: _concentration1 * volume1 = concentration2 * volume2 _

#Instructions:

For a given drug that is purchased, you will be given either:

  • The mass (in grams), the molecular weight (MW), and the desired concentration2 (in uM).

OR alternatively if the drug is purchased as a pre-dissolved liquid:

  • The concentration1 (in mM), the volume1, and the desired concentration2 (in uM).

For each purchase calculate and report an object with the following:

  • number of moles
  • concentration1 (in millimolar (mM))
  • volume1 (in mL)
  • concentration2 (in micromolar (uM))
  • volume2 (in mL)

All values will be >0

Round all floats to 3 decimal places

Fundamentals

More By Author:

Check out these other kata created by DrWilliamsSteven

Stats:

CreatedNov 29, 2016
Warriors Trained222
Total Skips71
Total Code Submissions116
Total Times Completed8
JavaScript Completions8
Total Stars1
% of votes with a positive feedback rating42% of 6
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes3
Total Rank Assessments4
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • DrWilliamsSteven Avatar
Ad