School Project, Need Help Fast!

Gavin Bauer gbauer at maine.rr.com
Tue Oct 12 17:05:45 EDT 2004


Please respond ASAP, the project is due soon.

In science, we are doing a "creative mini project" about minerals. People can write a song, or make a movie, etc. etc. Being the dry, uncreative person I am, I chose to use my limited python knowledge to create a "Mineral Program" the idea is that a person inputs a mineral name, and then the program gives them all the information about the mineral. At first I figured this would be easy. I would make an input line for mineral. Then I would use and if statement, and a whole bunch of elif statements, to give the info, here is the broken program I came up with:

print "Hi! Welcome to Gavins mineral project!"
print "We currently have a database of 30 minerals!"
print "Simply type the mineral's name, with the first letter capitalized."
print "To see what minerals we have available, type: List Minerals"
print "For futher help, type: Help"
print "To leave, type: Exit"
print ""
mineral = input("Mineral:")
while mineral != Exit:
    if mineral = Augite:
        print "a"
    elif mineral = Bauxite:
        print "a"
    elif mineral = Biotite:
        print "a"
    elif mineral = Bonite:
        print "a"
    elif mineral = Calcite:
        print "a"
    elif mineral = Chalcopyrite:
        print "a"
    elif mineral = Corundum:
        print "a"
    elif mineral = Feldspar:
        print "a"
    elif mineral = Fluorite:
        print "a"
    elif mineral = Galena:
        print "a"
    elif mineral = Garnet:
        print "a"
    elif mineral = Graphite:
        print "a"
    elif mineral = Gypsum:
        print "a"
    elif mineral = Halite:
        print "a"
    elif mineral = Hematite:
        print "a"
    elif mineral = Hornblende:
        print "a"
    elif mineral = Kaolinite:
        print "a"
    elif mineral = Limonite:
        print "a"
    elif mineral = Magnetite:
        print "a"
    elif mineral = Muscovite:
        print "a"
    elif mineral = Native Copper:
        print "a"
    elif mineral = Olivine:
        print "a"
    elif mineral = Pyrite:
        print "a"
    elif mineral = Quartz:
        print "a"
    elif mineral = Smoky Quartz:
        print "a"
    elif mineral = Sphalerite:
        print "a"
    elif mineral = Sulfer:
        print "a"
    elif mineral = Talc:
        print "a"
    elif mineral = List Minerals:
        print "a"
    elif mineral = Help:
        print "a"
    else:
        print "That mineral isn't in our database."
        print "Type Help for further assistance or try again."

raw_input("Press enter to exit")

The "a"'s would be where I would put all the mineral information. I figured I'd get the program straight before I did research. The "press enter to exit" thing is because my DOS shuts off the second it finishes computing, which leaves me without seeing the final information. I would love it if someone knew how I could change my Dos preference, but I would be pushing my luck to get a response in time at all.

Thanks a lot   -Gavin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041012/991cdd4c/attachment.html>


More information about the Python-list mailing list