School Project, Need Help Fast!

Robert Brewer fumanchu at amor.org
Tue Oct 12 17:48:43 EDT 2004


Gavin Bauer wrote:
> In science, we are doing a "creative mini project"
> about minerals. ... 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:
...
> if mineral = Augite:
      print "a"

That should be more like:

if mineral == "Augite":
    print "a"

...but you shouldn't be using a huge if..elif statement. Use a list
instead and test for "mineral in mineral_list".

> 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...

There's a switch for that which I can't recall at the moment.
Workaround: Start->Run->cmd, then navigate to your script and type
"python myscript.py".


Robert Brewer, who isn't going to do *all* the work for you ;)
MIS
Amor Ministries
fumanchu at amor.org




More information about the Python-list mailing list