Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- display()
- input = read()
- if input == "Hydrogen" then
- hydrogen()
- elseif input == "hydrogen" then
- hydrogen()
- elseif input == "H" then
- hydrogen()
- elseif input == "Helium" then
- helium()
- elseif input == "helium" then
- helium()
- elseif input == "He" then
- helium()
- elseif input == "Lithium" then
- lithium()
- elseif input == "litium" then
- lithium()
- elseif input == "Li" then
- lithium()
- elseif input == "Beryllium" then
- beryllium()
- elseif input == "beryllium" then
- beryllium()
- elseif input == "Be" then
- beryllium()
- elseif input == "Boron" then
- boron()
- elseif input == "boron" then
- boron()
- elseif input == "B" then
- boron()
- elseif input == "Carbon" then
- carbon()
- elseif input == "carbon" then
- carbon()
- elseif input == "C" then
- carbon()
- elseif input == "Nitrogen" then
- nitrogen()
- elseif input == "nitrogen" then
- nitrogen()
- elseif input == "N" then
- nitrogen()
- elseif input == "Oxygen" then
- oxygen()
- elseif input == "oxygen" then
- oxygen()
- elseif input == "O" then
- oxygen()
- elseif input == "Fluorine" then
- fluorine()
- elseif input == "fluorine" then
- fluorine()
- elseif input == "F" then
- fluorine()
- elseif input == "Neon" then
- neon()
- elseif input == "neon" then
- neon()
- elseif input == "Ne" then
- neon()
- elseif input == "Sodium" then
- sodium()
- elseif input == "sodium" then
- sodium()
- elseif input == "Na" then
- sodium()
- elseif input == "Magnesium" then
- magnesium()
- elseif input == "magnesium" then
- magnesium()
- elseif input == "Mg" then
- magnesium()
- elseif input == "Aluminum" then
- aluminum()
- elseif input == "aluminum" then
- aluminum()
- elseif input == "Al" then
- aluminum()
- elseif input == "Silicon" then
- silicon()
- elseif input == "silicon" then
- silicon()
- elseif input == "Si" then
- silicon()
- elseif input == "Phosphorus" then
- phosphorus()
- elseif input == "phosphorus" then
- phosphorus()
- elseif input == "P" then
- phosphorus()
- elseif input == "Sulfur" then
- sulfur()
- elseif input == "sulfur" then
- sulfur()
- elseif input == "S" then
- sulfur()
- elseif input then
- term.clear()
- term.setCursorPos(1,1)
- print("INVALID: PLEASE TRY AGAIN...")
- sleep(2)
- main()
- end
- end
- function display()
- term.clear()
- term.setCursorPos(1,1)
- print("Chemistry Assistant 1.0 Alpha")
- print("")
- print("Element Name:")
- write("> ")
- end
- function sulfur()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Sulfur
- Atomic Symbol: S
- Atomic #: 16
- Atomic Mass #: 32
- Group: 16 (6)
- Period: 3
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [Ne], 3s^2, 3p^4
- Electrons per Shell: 2,8,6
- Valence Electrons: 6
- ]]
- end
- function phosphorus()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Phosphorus
- Atomic Symbol: P
- Atomic #: 15
- Atomic Mass #: 31
- Group: 15 (5)
- Period: 3
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [Ne], 3s^2, 3p^3
- Electrons per Shell: 2,8,5
- Valence Electrons: 5
- ]]
- end
- function silicon()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Silicon
- Atomic Symbol: Si
- Atomic #: 14
- Atomic Mass #: 28
- Group: 14 (4)
- Period: 3
- Element Category: Metalloids
- Block: P-Block
- Electron Configuration: [Ne], 3s^2, 3p^2
- Electrons per Shell: 2,8,4
- Valence Electrons: 4
- ]]
- end
- function aluminum()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Aluminum
- Atomic Symbol: Al
- Atomic #: 13
- Atomic Mass #: 27
- Group: 13 (3)
- Period: 3
- Element Category: Post-Transition Metals
- Block: P-Block
- Electron Configuration: [Ne], 3s^2, 3p^1
- Electrons per Shell: 2,8,3
- Valence Electrons: 3
- ]]
- end
- function magnesium()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Magnesium
- Atomic Symbol: Mg
- Atomic #: 12
- Atomic Mass #: 24
- Group: 2
- Period: 3
- Element Category: Alkaline Earth Metals
- Block: S-Block
- Electron Configuration: [Ne], 3s^2
- Electrons per Shell: 2,8,2
- Valence Electrons: 2
- ]]
- end
- function sodium()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Sodium
- Atomic Symbol: Na
- Atomic #: 11
- Atomic Mass #: 23
- Group: 1
- Period: 3
- Element Category: Alkali Metals
- Block: S-Block
- Electron Configuration: [Ne], 3s^1
- Electrons per Shell: 2,8,1
- Valence Electrons: 1
- ]]
- end
- function neon()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Neon
- Atomic Symbol: Ne
- Atomic #: 10
- Atomic Mass #: 20
- Group: 18 (8)
- Period: 2
- Element Category: Noble Gasses
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^6; [Ne]
- Electrons per Shell: 2,8
- Valence Electrons: 8
- ]]
- end
- function fluorine()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Fluorine
- Atomic Symbol: F
- Atomic #: 9
- Atomic Mass #: 19
- Group: 17 (7)
- Period: 2
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^5
- Electrons per Shell: 2,7
- Valence Electrons: 7
- ]]
- end
- function oxygen()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Oxygen
- Atomic Symbol: O
- Atomic #: 8
- Atomic Mass #: 16
- Group: 16 (6)
- Period: 2
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^4
- Electron(s) per Shell: 2,6
- Valence Electron(s): 6
- ]]
- end
- function nitrogen()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Nitrogen
- Atomic Symbol: N
- Atomic #: 7
- Atomic Mass #: 14
- Group: 15 (5)
- Period: 2
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^3
- Electron(s) per Shell: 2,5
- Valence Electron(s): 5
- ]]
- end
- function carbon()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Carbon
- Atomic Symbol: C
- Atomic #: 6
- Atomic Mass #: 12
- Group: 14 (4)
- Period: 2
- Element Category: Other Non-Metals
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^2
- Electron(s) per Shell: 2,4
- Valence Electron(s): 4
- ]]
- end
- function boron()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Boron
- Atomic Symbol: B
- Atomic #: 5
- Atomic Mass #: 11
- Group: 13 (3)
- Period: 2
- Element Category: Metalloids
- Block: P-Block
- Electron Configuration: [He], 2s^2, 2p^1
- Electron(s) per Shell: 2,3
- Valence Electron(s): 3
- ]]
- end
- function beryllium()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Beryllium
- Atomic Symbol: Be
- Atomic #: 4
- Atomic Mass #: 9
- Group: 2
- Period: 2
- Element Category: Alkaline Earth Metals
- Block: S-Block
- Electron Configuration: [He], 2s^2
- Electron(s) per Shell: 2,2
- Valence Electron(s): 2
- ]]
- end
- function lithium()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Lithium
- Atomic Symbol: Li
- Atomic #: 3
- Atomic Mass #: 7
- Group: 1
- Period: 2
- Element Category: Alkali Metals
- Block: S-Block
- Electron Configuration: [He], 2s^1
- Electron(s) per Shell: 2,1
- Valence Electron(s): 1
- ]]
- end
- function helium()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Helium
- Atomic Symbol: He
- Atomic #: 2
- Atomic Mass #: 4
- Group: 18
- Period: 1
- Element Category: Noble Gasses
- Block: S-Block
- Electron Configuration: 1s^2; [He]
- Electron(s) per Shell: 2
- Valence Electron(s): 2
- ]]
- end
- function hydrogen()
- term.clear()
- term.setCursorPos(1,1)
- print[[
- Atomic Name: Hydrogen
- Atomic Symbol: H
- Atomic #: 1
- Atomic Mass #: 1
- Group: 1
- Period: 1
- Element Category: Diatomic Non-Metals
- Block: S-Block
- Electron Configuration: 1s^1
- Electron(s) per Shell: 1
- Valence Electron(s): 1
- ]]
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement