Skip to content

creates an ionic compound from a selection of cations and anions

Notifications You must be signed in to change notification settings

lkollmorgen/ions_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ionic Compound Predictor

Laura Jones

Initialized 4.8.24

The following script accepts two ions (one cation and one anion) from the command line or terminal and generates the proper molecular formula for the ionic compound.

Usage

Command Line

python compound_main.py <ion1> <ion2>

Terminal

python compound_main.py
<ion1> <ion2>

See Compatible Ion List:

python compound_main.py 
ion_list()
<ion1> <ion2>

<Ion 1> <Ion 2> List

Formula of Cation Charge of Cation Formula of Anion Charge of Anion
li 1 f 1
na 1 cl 1
k 1 br 1
cu(i) 1 i 1
h 1 o 2
rb 1 s 2
cd 1 se 2
ag 1 n 3
cu(ii) 2 p 3
zn 2 as 3
ca 2
mg 2
fe(ii) 2
be 2
ba 2
sr 2
al 3
fe(iii) 3
co(iii) 3

Reflection

This project was very helpful in better understanding error handling and the finer details of user-input
The next step will be to integrate it into my project website using pyscript.

About

creates an ionic compound from a selection of cations and anions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages