MolarManager.ipynb

In [1]:
from xv.chemistry.physical import MolarManager
In [2]:
ke = MolarManager()
ke
Out[2]:
3127720928496@MolarManager

Details of elements


Minimum Grade: 6
Maximum Grade: 12


Examples
--------
ke = MolarManager()
ke

ke.printProblemTypes()

ke.getRandomProblem()
ke.getRandomProblem(problem_type = 0)
...

ke.printProblem()
ke.printAnswer()
ke.printSolution()


doc_style: xv_doc

In [3]:
ke.printProblemTypes()
0. _problem_mole_in_pint
1. _problem_mole_relation
2. _problem_misc
3. _problem_mole
4. _problem_unit_to_gram
5. _problem_mole_to_gram
6. _problem_gram_to_mole
In [4]:
from IPython.display import HTML
n = len(ke._problemTemplates)
max_loop = 1
for j in range(0, max_loop):
    for i in range(n):
        problem_type = i
        display(HTML(f"<h2>problem_type: {problem_type}/{n-1} (loop {j}/{max_loop-1})</h2>"))
        ke.getRandomProblem(problem_type = problem_type, verbose = True)
        display(ke.printProblem())

        display(HTML(f"<h6>Answer:</h6>"))
        display(ke.printAnswer())

        display(HTML(f"<h6>Solution:</h6>"))
        display(ke.printSolution())
        pass

problem_type: 0/6 (loop 0/0)

Problem Template: _problem_mole_in_pint

Write relations related to mole.
Answer:
Solution:
.Quantity'>
1.008 gram
.Quantity'>
1 mole
.Unit'>
mole
.Quantity'>
1 mole
.Quantity'>
1 mole
.Quantity'>
0.2016 mole
.Quantity'>
6.02214076e+23 / mole
.Quantity'>
6.02214076e+23 dimensionless

problem_type: 1/6 (loop 0/0)

Problem Template: _problem_mole_relation

Write relations related to mole.
Answer:
Solution:
1 mole = avogadro_number = 6.02214076e+23 = N

1 mole amu = 1 gram

6.022140762081123e+23 amu = 1 gram

problem_type: 2/6 (loop 0/0)

Problem Template: _problem_misc

https://www.youtube.com/watch?v=-KfG8kH-r3Y&t=919s
1. What is a mole?
a. 1 mole = 6.022e23
b. 1 mole amu = 6.022e23 amu = 1 g

2. Convert one unit the following into gram.
Hydrogen atom
Hydrogen molecule
Hydrogen ion
Oxygen atom
Oxygen molecule
Oxygen ion = (15.999 amu - 2 * 5.488e-4 amu) * ( 1 g / 6.022e23 amu )
Sodium atom
Sodium molecule
Sodium ion
H2SO4 molecule
Sulphate ion = (32.06 amu + 4 * 15.999 amu + 2 * 5.488e-4 amu) * ( 1 g / 6.022e23 amu )

3. Convert one mole of the following into gram.
Hydrogen atom
Hydrogen molecule
Hydrogen ion
Oxygen atom
Oxygen molecule
Oxygen ion
Sodium atom
Sodium molecule
Sodium ion
H2SO4 molecule
Sulphate ion

Solution for sodium ion:
1 mole = 6.022e23
1 sodium ion = (22.990 amu - 5.488e-4 amu)

1 mole sodium ion * ( 6.022e23 / 1 mole ) * ( (22.990 amu - 5.488e-4 amu) / sodium ion )


4. Convert 100 gram of the following into mole.
Hydrogen atom
Hydrogen molecule
Hydrogen ion
Oxygen atom
Oxygen molecule
Oxygen ion
Sodium atom
Sodium molecule
Sodium ion
H2SO4 molecule
Sulphate ion

Solution for Oxygen molecule
1 mole = 6.022e23
1 Oxygen molecole = 2 * 15.999 amu
100 g ( 6.022e23 amu / 1 g )
* (1 Oxygen molecule / 2 * 15.999 amu)
* ( 1 mole / 6.022e23 )
= k mole Oxygen molecule

Answer:
Solution:

problem_type: 3/6 (loop 0/0)

Problem Template: _problem_mole

1. What is a mole?
Answer:
a. 1 mole = 6.022e23
b. 1 mole amu = 6.022e23 amu = 1 g
Solution:
a. 1 mole = 6.022e23
b. 1 mole amu = 6.022e23 amu = 1 g

problem_type: 4/6 (loop 0/0)

Problem Template: _problem_unit_to_gram

2. Convert one unit the following into gram.
a. Hydrogen atom
b. Hydrogen molecule
c. Hydrogen ion
d. Oxygen atom
e. Oxygen molecule
f. Oxygen ion
g. Sodium atom
h. Sodium molecule
i. Sodium ion
j. H2SO4 molecule
k. Sulphate ion
Answer:
a. Hydrogen atom (H) = 1.6738625041514446e-24 g
b. Hydrogen molecule (H2) = 3.347725008302889e-24 g
c. Hydrogen ion (H+) = 1.6729511790102956e-24 g
d. Oxygen atom (O) = 2.6567585519760876e-23 g
e. Oxygen molecule (O2) = 5.313517103952175e-23 g
f. Oxygen ion (O--) = 2.6565762869478576e-23 g
g. Sodium atom (Na) = 3.8176685486549315e-23 g
h. Sodium molecule (Na2) = 7.635337097309863e-23 g
i. Sodium ion (Na+) = 3.817577416140816e-23 g
j. H2SO4 molecule = 1.628561939554965e-22 g
k. Sulphate ion (SO4--) = 1.5951029159747593e-22 g
Solution:
a. Hydrogen atom (H)
mass = $\displaystyle 1.008 amu$
mass in grams = $\displaystyle 1.008 amu \left( \frac{1 g}{6.022e23 amu} \right)$ = 1.6738625041514446e-24 g

b. Hydrogen molecule (H2)
mass = $\displaystyle (2 \cdot 1.008 amu)$
mass in grams = $\displaystyle (2 \cdot 1.008 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 3.347725008302889e-24 g

c. Hydrogen ion (H+)
mass = $\displaystyle (1.008 amu - 0.0005488 amu)$
mass in grams = $\displaystyle (1.008 amu - 0.0005488 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 1.6729511790102956e-24 g

d. Oxygen atom (O)
mass = $15.999 amu$
mass in grams = $\displaystyle 15.999 amu \left( \frac{1 g}{6.022e23 amu} \right)$ = 2.6567585519760876e-23 g

e. Oxygen molecule (O2)
mass = $\displaystyle (2 \cdot 15.999 amu)$
mass in grams = $\displaystyle (2 \cdot 15.999 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 5.313517103952175e-23 g

f. Oxygen ion (O--)
mass = $(15.999 amu - 2 \cdot 0.0005488 amu)$
mass in grams = $\displaystyle (15.999 amu - 2 \cdot 0.0005488 amu) amu \left( \frac{1 g}{6.022e23 amu} \right)$ = 2.6565762869478576e-23 g

g. Sodium atom (Na)
mass = $\displaystyle 22.990 amu$
mass in grams = $\displaystyle 22.990 amu \left( \frac{1 g}{6.022e23 amu} \right)$ = 3.8176685486549315e-23 g

h. Sodium molecule (Na2)
mass = $\displaystyle (2 \cdot 22.990 amu)$
mass in grams = $\displaystyle (2 \cdot 22.990 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 7.635337097309863e-23 g

i. Sodium ion (Na+)
mass = $\displaystyle (22.990 amu - 0.0005488 amu)$
mass in grams = $\displaystyle (22.990 amu - 0.0005488 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 3.817577416140816e-23 g

j. H2SO4 molecule
mass = $\displaystyle (2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu)$
mass in grams = $\displaystyle (2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 1.628561939554965e-22 g

k. Sulphate ion (SO4--)
mass = $\displaystyle (32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu)$
mass in grams = $\displaystyle (32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu) \left( \frac{1 g}{6.022e23 amu} \right)$ = 1.5951029159747593e-22 g

problem_type: 5/6 (loop 0/0)

Problem Template: _problem_mole_to_gram

3. Convert one mole of the following into gram.
Hydrogen atom
Hydrogen molecule
Hydrogen ion
Oxygen atom
Oxygen molecule
Oxygen ion
Sodium atom
Sodium molecule
Sodium ion
H2SO4 molecule
Sulphate ion
Answer:
a. Hydrogen atom (H) = 1.008 g
b. Hydrogen molecule (H2) = 2.016 g
c. Hydrogen ion (H+) = 1.0074512 g
d. Oxygen atom (O) = 15.999 g
e. Oxygen molecule (O2) = 31.998 g
f. Oxygen ion (O--) = 15.997902400000001 g
g. Sodium atom (Na) = 22.990 g
h. Sodium molecule (Na2) = 45.98 g
i. Sodium ion (Na+) = 22.989451199999998 g
j. H2SO4 molecule = 98.072 g
k. Sulphate ion (SO4--) = 96.0570976 g
Solution:
a. Hydrogen atom (H)
$\displaystyle 1 Hydrogen = 1.008 amu$
$\displaystyle 1 mole Hydrogen \left( \frac{6.022e23}{1 mole} \right) \left( \frac{1.008 amu}{Hydrogen} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 1.008 g$


b. Hydrogen molecule (H2)
$\displaystyle 1 H2 = (2 \cdot 1.008 amu)$
$\displaystyle 1 mole H2 \left( \frac{6.022e23}{1 mole} \right) \left( \frac{2 \cdot 1.008 amu}{H2} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 2.016 g$

c. Hydrogen ion (H+)
$\displaystyle 1 H+ = (1.008 amu - 0.0005488 amu)$
$\displaystyle 1 mole Hydrogen \space ion \left( \frac{6.022e23}{1 mole} \right) \left( \frac{1.008 amu - 0.0005488 amu}{H+}\right) \left( \frac{1 g}{6.022e23 amu} \right) = 1.0074512 g$

d. Oxygen atom (O)
$\displaystyle 1 Oxygen = 15.999 amu$
$\displaystyle 1 mole Oxygen \left( \frac{6.022e23}{1 mole} \right) \left( \frac{15.999 amu}{Oxygen} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 15.999 g$

e. Oxygen molecule (O2)
$\displaystyle 1 O2 = (2 \cdot 15.999 amu)$
$\displaystyle 1 mole O2 \left( \frac{6.022e23}{1 mole} \right) \left( \frac{2 \cdot 15.999 amu}{O2} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 31.998 g$

f. Oxygen ion (O--)
$\displaystyle 1 O-- = (15.999 amu - 2 \cdot 0.0005488 amu)$
$\displaystyle 1 mole Oxygen \space ion \left( \frac{6.022e23}{1 mole} \right) \left( \frac{15.999 amu - 2 \cdot 0.0005488 amu}{O--} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 15.997902400000001 g$

g. Sodium atom (Na)
$\displaystyle 1 Sodium = 22.990 amu$
$\displaystyle 1 mole Sodium \left( \frac{6.022e23}{1 mole} \right) \left( \frac{22.990 amu}{Sodium} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 22.990 g$

h. Sodium molecule (Na2)
$\displaystyle 1 Na2 = (2 \cdot 22.990 amu)$
$\displaystyle 1 mole Na2 \left( \frac{6.022e23}{1 mole} \right) \left( \frac{2 \cdot 22.990 amu}{Na2} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 45.98 g$

i. Sodium ion (Na+)
$\displaystyle 1 Na+ = (22.990 amu - 0.0005488 amu)$
$\displaystyle 1 mole Sodium \space ion \left( \frac{6.022e23}{1 mole} \right) \left( \frac{22.990 amu - 5.488e-4 amu}{Na+} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 22.989451199999998 g$

j. H2SO4 molecule
$\displaystyle 1 H2SO4 = (2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu)$
$\displaystyle 1 mole H2SO4 \left( \frac{6.022e23}{1 mole} \right) \left( \frac{2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu}{H2SO4} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 98.072 g$

k. Sulphate ion (SO4--)
$\displaystyle 1 SO4-- = (32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu)$
$\displaystyle 1 mole SO4-- \left( \frac{6.022e23}{1 mole} \right) \left( \frac{32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu}{SO4--} \right) \left( \frac{1 g}{6.022e23 amu} \right) = 96.0570976 g$

problem_type: 6/6 (loop 0/0)

Problem Template: _problem_gram_to_mole

4. Convert 100 gram of the following into mole.
Hydrogen atom
Hydrogen molecule
Hydrogen ion
Oxygen atom
Oxygen molecule
Oxygen ion
Sodium atom
Sodium molecule
Sodium ion
H2SO4 molecule
Sulphate ion
Answer:
a. Hydrogen atom (H) = 99.2063492063492 mole H
b. Hydrogen molecule (H2) = 49.6031746031746 mole H2
c. Hydrogen ion (H+) = 99.2603909747688 mole H+
d. Oxygen atom (O) = 6.250390649415588 mole Oxygen
e. Oxygen molecule (O2) = 3.125195324707794 mole O2
f. Oxygen ion (O--) = 6.250819482434147 mole O--
g. Sodium atom (Na) = 4.349717268377556 mole Sodium
h. Sodium molecule (Na2) = 2.174858634188778 mole Na2
i. Sodium ion (Na+) = 4.34982110403749 mole Na+
j. H2SO4 molecule = 1.0196590260216982 mole H2SO4
k. Sulphate ion (SO4--) = 1.0410474863233843 mole SO4--
Solution:
a. Hydrogen atom (H)
$\displaystyle 1 Hydrogen = 1.008 amu$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{Hydrogen}{1.008 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 99.2063492063492 mole H$


b. Hydrogen molecule (H2)
$\displaystyle 1 H2 = (2 \cdot 1.008 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{H2}{2 \cdot 1.008 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 49.6031746031746 mole H2$

c. Hydrogen ion (H+)
$\displaystyle 1 H+ = (1.008 amu - 0.0005488 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{H+}{1.008 amu - 0.0005488 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 99.2603909747688 mole H+$

d. Oxygen atom (O)
$\displaystyle 1 Oxygen = 15.999 amu$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{Oxygen}{15.999 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 6.250390649415588 mole Oxygen$

e. Oxygen molecule (O2)
$\displaystyle 1 O2 = (2 \cdot 15.999 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{O2}{2 \cdot 15.999 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 3.125195324707794 mole O2$

f. Oxygen ion (O--)
$\displaystyle 1 O-- = (15.999 amu - 2 \cdot 0.0005488 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{O2}{15.999 amu - 2 \cdot 0.0005488 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 6.250819482434147 mole O--$

g. Sodium atom (Na)
$\displaystyle 1 Sodium = 22.990 amu$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{Sodium}{22.990 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 4.349717268377556 mole Sodium$

h. Sodium molecule (Na2)
$\displaystyle 1 Na2 = (2 \cdot 22.990 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{Na2}{2 \cdot 22.990 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 2.174858634188778 mole Na2$

i. Sodium ion (Na+)
$\displaystyle 1 Na+ = (22.990 amu - 0.0005488 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{Na+}{22.990 amu - 0.0005488 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 4.34982110403749 mole Na+$

j. H2SO4 molecule
$\displaystyle 1 H2SO4 = (2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{H2SO4}{2 \cdot 1.008 amu + 32.06 amu + 4 \cdot 15.999 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 1.0196590260216982 mole H2SO4$

k. Sulphate ion (SO4--)
$\displaystyle 1 SO4-- = (32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu)$
$\displaystyle 100 g \left( \frac{6.022e23 amu}{1 g} \right) \left( \frac{SO4--}{32.06 amu + 4 \cdot 15.999 amu + 2 \cdot 0.0005488 amu} \right) \left( \frac{1 mole}{6.022e23} \right) = 1.0410474863233843 mole SO4--$
In [ ]:
 

Machine Learning

  1. Deal Banking Marketing Campaign Dataset With Machine Learning

TensorFlow

  1. Difference Between Scalar, Vector, Matrix and Tensor
  2. TensorFlow Deep Learning Model With IRIS Dataset
  3. Sequence to Sequence Learning With Neural Networks To Perform Number Addition
  4. Image Classification Model MobileNet V2 from TensorFlow Hub
  5. Step by Step Intent Recognition With BERT
  6. Sentiment Analysis for Hotel Reviews With NLTK and Keras
  7. Simple Sequence Prediction With LSTM
  8. Image Classification With ResNet50 Model
  9. Predict Amazon Inc Stock Price with Machine Learning
  10. Predict Diabetes With Machine Learning Algorithms
  11. TensorFlow Build Custom Convolutional Neural Network With MNIST Dataset
  12. Deal Banking Marketing Campaign Dataset With Machine Learning

PySpark

  1. How to Parallelize and Distribute Collection in PySpark
  2. Role of StringIndexer and Pipelines in PySpark ML Feature - Part 1
  3. Role of OneHotEncoder and Pipelines in PySpark ML Feature - Part 2
  4. Feature Transformer VectorAssembler in PySpark ML Feature - Part 3
  5. Logistic Regression in PySpark (ML Feature) with Breast Cancer Data Set

PyTorch

  1. Build the Neural Network with PyTorch
  2. Image Classification with PyTorch
  3. Twitter Sentiment Classification In PyTorch
  4. Training an Image Classifier in Pytorch

Natural Language Processing

  1. Spelling Correction Of The Text Data In Natural Language Processing
  2. Handling Text For Machine Learning
  3. Extracting Text From PDF File in Python Using PyPDF2
  4. How to Collect Data Using Twitter API V2 For Natural Language Processing
  5. Converting Text to Features in Natural Language Processing
  6. Extract A Noun Phrase For A Sentence In Natural Language Processing