'single positional indexer is out-of-bounds while using chemlib with an input
I'm trying to make a chemistry dictionnary were a user can get infos just by asking.
here is the code:
Input = input("enter element symbol")
User_element= Element(Input)
ElementPropreties = User_element.properties
User_Info = input("what do you want ?")
if User_Info == 'properties':
print(ElementPropreties)
else:
print("Thank you for your visit user" + str(r1))
if User_Info == 'Valence':
print(User_element.Valence)
def Dalton_law_function():
if User_element.Density == User_element.Density:
print("The law of multiple proportions from Dalton is repected for this mix")
if User_element.Density != Element.Density:
print("The law of multiple proportions from Dalton doesnt respect for this mix")
def User_info_mp():
if User_Info == "multiple proportions":
return Dalton_law_function()
User_info_mp()
here is the mistake I've got when I've run it:
IndexError Traceback (most recent call last)
<ipython-input-37-d19852e411ef> in <module>()
IndexError: single positional indexer is out-of-bounds
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
