ChemCalcManager.ipynb

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

Details of elements


Minimum Grade: 6
Maximum Grade: 12


Examples
--------
ke = ChemCalcManager()
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_units_and_dimensions
1. _problem_dimensionless_numbers
2. _problem_mole_relation
3. _problem_unit_to_amu
4. _problem_unit_to_gram
5. _problem_mole_to_gram
6. _problem_gram_to_mole
7. _problem_convert_units
8. _problem_physical_constants
9. _problem_dimension_of_constant
In [ ]:
 
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/9 (loop 0/0)

Problem Template: _problem_units_and_dimensions

What are units and dimensions.
Answer:
Dimensions are physical quantities that can be measured. Units are popular names used to measure relativeness of physical quantities. Unit correspond to a dimension or is composite of more than one such units.
For example,
Physical Quantity Dimension Units Made of units/dimension
length length meter meter
area length ** 2 meter ** 2s meter
length length inch
speed length / time meter / second meter, second
speed length / time inch / second inch, second
Solution:
Dimensions are physical quantities that can be measured. Units are popular names used to measure relativeness of physical quantities. Unit correspond to a dimension or is composite of more than one such units.
For example,
Physical Quantity Dimension Units Made of units/dimension
length length meter meter
area length ** 2 meter ** 2s meter
length length inch
speed length / time meter / second meter, second
speed length / time inch / second inch, second

problem_type: 1/9 (loop 0/0)

Problem Template: _problem_dimensionless_numbers

Write the alternative names for the followings:
$\displaystyle 2$
$\displaystyle 12$
$\displaystyle 100$
$\displaystyle 1000$
$\displaystyle {{10}}^{{3}}$
$\displaystyle {{10}}^{{6}}$
$\displaystyle {{10}}^{{9}}$
$\displaystyle 6.023 * {{10}}^{{23}}$
Answer:
$\displaystyle 2$ = pair
$\displaystyle 12$ = dozen
$\displaystyle 100$ = century, hundred
$\displaystyle 1000$ = kilo, thousand
$\displaystyle {{10}}^{{3}}$ = kilo, thousand
$\displaystyle {{10}}^{{6}}$ = million
$\displaystyle {{10}}^{{9}}$ = billion
$\displaystyle 6.023 * {{10}}^{{23}}$ = mole, Avogadro Number

Note: avogadro_number is also written as N.
Solution:
$\displaystyle 2$ = pair
$\displaystyle 12$ = dozen
$\displaystyle 100$ = century, hundred
$\displaystyle 1000$ = kilo, thousand
$\displaystyle {{10}}^{{3}}$ = kilo, thousand
$\displaystyle {{10}}^{{6}}$ = million
$\displaystyle {{10}}^{{9}}$ = billion
$\displaystyle 6.023 * {{10}}^{{23}}$ = mole, Avogadro Number

Note: avogadro_number is also written as N.

problem_type: 2/9 (loop 0/0)

Problem Template: _problem_mole_relation

What is relation between unified_atomic_mass_unit (amu) and gram.
Answer:
1 mole = avogadro_number = 6.02214076e+23 = N

1 mole amu = 1 gram

6.022140762081123e+23 amu = 1 gram
Solution:
1 mole = avogadro_number = 6.02214076e+23 = N

1 mole amu = 1 gram

6.022140762081123e+23 amu = 1 gram

problem_type: 3/9 (loop 0/0)

Problem Template: _problem_unit_to_amu

Convert 1 Sodium atom into amu.

Note: Use mass of particles from periodic table.
Answer:
$\displaystyle
22.9900000000000 \; amu
$
Solution:
1 Sodium atom

$\displaystyle
= 1 * Na
$

$\displaystyle
= 1 * \left( 22.990 \right) \; amu
$

$\displaystyle
= 22.9900000000000 \; amu
$

problem_type: 4/9 (loop 0/0)

Problem Template: _problem_unit_to_gram

Convert 7 Hydrogen molecule into gram.

Note: Use mass of particles from periodic table.
Answer:
$\displaystyle
2.34340750581202E-23 \; gram
$
Solution:
Please note:
1 mole amu = 1 gram
1 mole = $\displaystyle {6.022} * {10}^{23} $

Now:
7 Hydrogen molecule

$\displaystyle
= 7 * H_{{2}}
$

$\displaystyle
= 7 * \left( 2 * 1.008 \right) \; amu
$

$\displaystyle
= 7 *
\left( 2 * 1.008 \right) \; amu
* \left( \frac{1 \; gram} { 1 \; mole \; amu} \right)
* \left( \frac{1 \; mole} {6.022 * {10}^{23}} \right)
$

$\displaystyle
= 2.34340750581202E-23 \; gram
$

problem_type: 5/9 (loop 0/0)

Problem Template: _problem_mole_to_gram

Convert 7 mole Ferric ion into gram.

Note: Use mass of particles from periodic table.
Answer:
$\displaystyle
390.903475200000 \; gram
$
Solution:
Please note:
1 mole amu = 1 gram
1 mole = $\displaystyle {6.022} * {10}^{23} $

Now:
7 mole Ferric ion

$\displaystyle
= 7 \; mole * Fe^{{3+}}
$

$\displaystyle
= 7 \; mole * \left( 55.845 - 3 * 0.0005488 \right) amu
$

$\displaystyle
= 390.903475200000 \; mole \; amu
$

$\displaystyle
= 390.903475200000 \; gram
$

problem_type: 6/9 (loop 0/0)

Problem Template: _problem_gram_to_mole

Convert 7 gram Sulphuric Acid molecule into mole.

Note: Use mass of particles from periodic table.
Answer:
$\displaystyle
0.0713761318215189
\; mole \; \text{Sulphuric Acid molecule}
$
Solution:
Please note:
1 mole amu = 1 gram
1 mole = $\displaystyle {6.022} * {10}^{23} $

First part:

1 Sulphuric Acid molecule

$\displaystyle
= 1 * H_{{2}}SO_{{4}}
$

$\displaystyle
= 1 * \left( 2 * 1.008 + 32.06 + 4 * 15.999 \right) \; amu
$

$\displaystyle
= 98.0720000000000 \; amu
$


Second part:

7 gram

$\displaystyle
= 7 \; gram

* \left(
\frac{1 \; mole \; amu } { 1 \; gram}
\right)

* \left(
\frac{ 1 \; \text{Sulphuric Acid molecule} } { 98.0720000000000 \; amu }
\right)

$


$\displaystyle
= 0.0713761318215189
\; mole \; \text{Sulphuric Acid molecule}
$

problem_type: 7/9 (loop 0/0)

Problem Template: _problem_convert_units

Convert 4 square-kilo-meter to square-meter.

Note: You may use the following table:
1 hectare     =     2.47 acre
1 hectare     =     10000 square-meter
1 square-inch     =     6.4516 square-centi-meter
1 square-feet     =     144 square-inch
1 square-yard     =     9 square-feet
1 square-mile     =     2.588881 square-kilo-meter
1 square-kilo-meter     =     1000000 square-meter
1 square-centi-meter     =     0.0001 square-meter
Answer:
4000000.0 square-meter
Solution:

4 square-kilo-meter = ? square-meter
2022-09-09T15:25:50.334285 image/svg+xml Matplotlib v3.5.2, https://matplotlib.org/

The conversion path will be:
square-kilo-meter→square-meter



4 square-kilo-meter

= 4 square-kilo-meter * $ { \frac { 1000000\;square\;meter } { 1\;square\;kilo\;meter } } $


= 4 * $ { \frac { 1000000 } { 1 } } $ square-meter


= 4 * 1000000.0 square-meter

= 4000000.0 square-meter

problem_type: 8/9 (loop 0/0)

Problem Template: _problem_physical_constants
Write some of important physical constants used in chemistry.
Answer:
K alpha Cu d 220 = 0.80232719 $\displaystyle dimensionless$

K alpha Mo d 220 = 0.36940604 $\displaystyle dimensionless$

K alpha W d 220 = 0.108852175 $\displaystyle dimensionless$

atomic mass constant = 1.6605390666e-27 $\displaystyle kilogram$

avogadro constant = 6.02214076e+23 $\displaystyle \frac{1}{mole}$

avogadro number = 6.02214076e+23 $\displaystyle dimensionless$

boltzmann constant = 1.380649e-23 $\displaystyle \frac{kilogram\;meter^{2}}{kelvin\;second^{2}}$

classical electron radius = 2.817940326216153e-15 $\displaystyle meter$

conductance quantum = 7.74809172986365e-05 $\displaystyle \frac{ampere^{2}\;second^{3}}{kilogram\;meter^{2}}$

conventional josephson constant = 483597900000000.0 $\displaystyle \frac{ampere\;second^{2}}{kilogram\;meter^{2}}$

conventional von klitzing constant = 25812.807 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

coulomb constant = 8987551792.29697 $\displaystyle \frac{kilogram\;meter^{3}}{ampere^{2}\;second^{4}}$

dirac constant = 1.0545718176461565e-34 $\displaystyle \frac{kilogram\;meter^{2}}{second}$

electron g factor = -2.00231930436256 $\displaystyle dimensionless$

electron mass = 9.1093837015e-31 $\displaystyle kilogram$

elementary charge = 1.602176634e-19 $\displaystyle ampere\;second$

eulers number = 2.718281828459045 $\displaystyle dimensionless$

faraday constant = 96485.33212331001 $\displaystyle \frac{ampere\;second}{mole}$

fine structure constant = 0.007297352569307099 $\displaystyle dimensionless$

first radiation constant = 3.7417718521927573e-16 $\displaystyle \frac{kilogram\;meter^{4}}{second^{3}}$

impedance of free space = 376.73031366837046 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

josephson constant = 483597848416983.56 $\displaystyle \frac{ampere\;second^{2}}{kilogram\;meter^{2}}$

lattice spacing of Si = 1.920155716e-10 $\displaystyle meter$

ln10 = 2.302585092994046 $\displaystyle dimensionless$

magnetic flux quantum = 2.0678338484619295e-15 $\displaystyle \frac{kilogram\;meter^{2}}{ampere\;second^{2}}$

molar gas constant = 8.314462618153241 $\displaystyle \frac{kilogram\;meter^{2}}{kelvin\;mole\;second^{2}}$

neutron mass = 1.67492749804e-27 $\displaystyle kilogram$

newtonian constant of gravitation = 6.6743e-11 $\displaystyle \frac{meter^{3}}{kilogram\;second^{2}}$

pi = 3.141592653589793 $\displaystyle dimensionless$

planck constant = 6.626070150000001e-34 $\displaystyle \frac{kilogram\;meter^{2}}{second}$

proton mass = 1.67262192369e-27 $\displaystyle kilogram$

rydberg constant = 10973731.56816 $\displaystyle \frac{1}{meter}$

second radiation constant = 0.014387768775039339 $\displaystyle kelvin\;meter$

speed of light = 299792458.0 $\displaystyle \frac{meter}{second}$

standard atmosphere = 101325.0 $\displaystyle \frac{kilogram}{meter\;second^{2}}$

standard gravity = 9.80665 $\displaystyle \frac{meter}{second^{2}}$

stefan boltzmann constant = 5.670374419184431e-08 $\displaystyle \frac{kilogram}{kelvin^{4}\;second^{3}}$

tansec = 4.848136811133344e-06 $\displaystyle dimensionless$

thomson cross section = 6.652458732226516e-29 $\displaystyle meter^{2}$

vacuum permeability = 1.2566370621250601e-06 $\displaystyle \frac{kilogram\;meter}{ampere^{2}\;second^{2}}$

vacuum permittivity = 8.854187812764727e-12 $\displaystyle \frac{ampere^{2}\;second^{4}}{kilogram\;meter^{3}}$

von klitzing constant = 25812.807459304513 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

wien frequency displacement law constant = 58789257576.46826 $\displaystyle \frac{1}{kelvin\;second}$

wien u = 2.8214393721220787 $\displaystyle dimensionless$

wien wavelength displacement law constant = 0.002897771955185173 $\displaystyle kelvin\;meter$

wien x = 4.965114231744276 $\displaystyle dimensionless$

zeta = 29979245800.0 $\displaystyle dimensionless$
Solution:
K alpha Cu d 220 = 0.80232719 $\displaystyle dimensionless$

K alpha Mo d 220 = 0.36940604 $\displaystyle dimensionless$

K alpha W d 220 = 0.108852175 $\displaystyle dimensionless$

atomic mass constant = 1.6605390666e-27 $\displaystyle kilogram$

avogadro constant = 6.02214076e+23 $\displaystyle \frac{1}{mole}$

avogadro number = 6.02214076e+23 $\displaystyle dimensionless$

boltzmann constant = 1.380649e-23 $\displaystyle \frac{kilogram\;meter^{2}}{kelvin\;second^{2}}$

classical electron radius = 2.817940326216153e-15 $\displaystyle meter$

conductance quantum = 7.74809172986365e-05 $\displaystyle \frac{ampere^{2}\;second^{3}}{kilogram\;meter^{2}}$

conventional josephson constant = 483597900000000.0 $\displaystyle \frac{ampere\;second^{2}}{kilogram\;meter^{2}}$

conventional von klitzing constant = 25812.807 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

coulomb constant = 8987551792.29697 $\displaystyle \frac{kilogram\;meter^{3}}{ampere^{2}\;second^{4}}$

dirac constant = 1.0545718176461565e-34 $\displaystyle \frac{kilogram\;meter^{2}}{second}$

electron g factor = -2.00231930436256 $\displaystyle dimensionless$

electron mass = 9.1093837015e-31 $\displaystyle kilogram$

elementary charge = 1.602176634e-19 $\displaystyle ampere\;second$

eulers number = 2.718281828459045 $\displaystyle dimensionless$

faraday constant = 96485.33212331001 $\displaystyle \frac{ampere\;second}{mole}$

fine structure constant = 0.007297352569307099 $\displaystyle dimensionless$

first radiation constant = 3.7417718521927573e-16 $\displaystyle \frac{kilogram\;meter^{4}}{second^{3}}$

impedance of free space = 376.73031366837046 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

josephson constant = 483597848416983.56 $\displaystyle \frac{ampere\;second^{2}}{kilogram\;meter^{2}}$

lattice spacing of Si = 1.920155716e-10 $\displaystyle meter$

ln10 = 2.302585092994046 $\displaystyle dimensionless$

magnetic flux quantum = 2.0678338484619295e-15 $\displaystyle \frac{kilogram\;meter^{2}}{ampere\;second^{2}}$

molar gas constant = 8.314462618153241 $\displaystyle \frac{kilogram\;meter^{2}}{kelvin\;mole\;second^{2}}$

neutron mass = 1.67492749804e-27 $\displaystyle kilogram$

newtonian constant of gravitation = 6.6743e-11 $\displaystyle \frac{meter^{3}}{kilogram\;second^{2}}$

pi = 3.141592653589793 $\displaystyle dimensionless$

planck constant = 6.626070150000001e-34 $\displaystyle \frac{kilogram\;meter^{2}}{second}$

proton mass = 1.67262192369e-27 $\displaystyle kilogram$

rydberg constant = 10973731.56816 $\displaystyle \frac{1}{meter}$

second radiation constant = 0.014387768775039339 $\displaystyle kelvin\;meter$

speed of light = 299792458.0 $\displaystyle \frac{meter}{second}$

standard atmosphere = 101325.0 $\displaystyle \frac{kilogram}{meter\;second^{2}}$

standard gravity = 9.80665 $\displaystyle \frac{meter}{second^{2}}$

stefan boltzmann constant = 5.670374419184431e-08 $\displaystyle \frac{kilogram}{kelvin^{4}\;second^{3}}$

tansec = 4.848136811133344e-06 $\displaystyle dimensionless$

thomson cross section = 6.652458732226516e-29 $\displaystyle meter^{2}$

vacuum permeability = 1.2566370621250601e-06 $\displaystyle \frac{kilogram\;meter}{ampere^{2}\;second^{2}}$

vacuum permittivity = 8.854187812764727e-12 $\displaystyle \frac{ampere^{2}\;second^{4}}{kilogram\;meter^{3}}$

von klitzing constant = 25812.807459304513 $\displaystyle \frac{kilogram\;meter^{2}}{ampere^{2}\;second^{3}}$

wien frequency displacement law constant = 58789257576.46826 $\displaystyle \frac{1}{kelvin\;second}$

wien u = 2.8214393721220787 $\displaystyle dimensionless$

wien wavelength displacement law constant = 0.002897771955185173 $\displaystyle kelvin\;meter$

wien x = 4.965114231744276 $\displaystyle dimensionless$

zeta = 29979245800.0 $\displaystyle dimensionless$

problem_type: 9/9 (loop 0/0)

Problem Template: _problem_dimension_of_constant
What is dimension and base unit of rydberg_constant?
Answer:
rydberg_constant = 1 / meter
Solution:
rydberg_constant = 1 / meter

To get names of all compatible units:
ke.ps.get_compatible_units(unit_name)
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