RE: School Project, Need Help Fast!

Discussion in 'Python' started by Robert Brewer, Oct 12, 2004.

  1. 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
     
    Robert Brewer, Oct 12, 2004
    #1
    1. Advertising

  2. Robert Brewer <> typed:
    > Gavin Bauer wrote:
    >> 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".


    Goto "Folder Options" and "File Types" and select .py files.

    Add a new action called "open in persistent window" with the following
    command:
    cmd.exe /x /k C:\Python23\python.exe "%1" %*

    You can make that the default action if you want. I didn't, prefering to
    make editing the file my default action.
     
    Patrick Ellis, Oct 13, 2004
    #2
    1. Advertising

  3. Patrick Ellis wrote:

    >Robert Brewer <> typed:
    >
    >
    >>Gavin Bauer wrote:
    >>
    >>
    >>>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".
    >>
    >>

    >
    >Goto "Folder Options" and "File Types" and select .py files.
    >
    >Add a new action called "open in persistent window" with the following
    >command:
    >cmd.exe /x /k C:\Python23\python.exe "%1" %*
    >
    >You can make that the default action if you want. I didn't, prefering to
    >make editing the file my default action.
    >
    >
    >
    >

    Oh, that is what he meant. I guess I am a little slow on the uptake.
    Where'd the bloke go? He made it sound so urgent.
     
    Richard Blackwood, Oct 13, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    374
    Rhino
    Mar 21, 2006
  2. Replies:
    2
    Views:
    324
    rossum
    Feb 27, 2007
  3. CoreyWhite
    Replies:
    0
    Views:
    373
    CoreyWhite
    Mar 23, 2007
  4. CoreyWhite

    The Old School Meet's The New School.

    CoreyWhite, Mar 23, 2007, in forum: C Programming
    Replies:
    0
    Views:
    361
    CoreyWhite
    Mar 23, 2007
  5. jack
    Replies:
    0
    Views:
    389
Loading...

Share This Page