There are several ways to do this. First, you might want to use a menu, with a number input, instead of keying in "aluminium", etc. as they can be spelled differently (aluminum). Then use a dictionary or list of lists to chain the values to the raw material.
material_dict = {"concrete" : 0.000012,
"silver" : 0.000019,
"gold" : 0.000014 } ## etc
# or
material_list = [ ["concrete", 0.000012], \
["silver", 0.000019], \
["gold", 0.000014] ]
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
Generally speaking, a dictionary should be used instead of several if/elif/else statements. It is easier to read and understand, and easier to modify since entries can be added or deleted from the dictionary. You will probably use dictionaries quite often so try to become more familiar with the object over time.
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714