need help with python

adamurbas at hotmail.com adamurbas at hotmail.com
Fri May 11 22:21:56 EDT 2007


On May 11, 9:11 pm, "Ian Clark" <turb... at gmail.com> wrote:
> On 11 May 2007 18:47:27 -0700, adamur... at hotmail.com
>
>
>
> <adamur... at hotmail.com> wrote:
> > ya so im pretty much a newb to this whole python thing... its pretty
> > cool but i just started today and im already having trouble.  i
> > started to use a tutorial that i found somewhere and i followed the
> > instructions and couldnt get the correct results.  heres the code
> > stuff...
>
> > temperature=input("what is the temperature of the spam?")
> > if temperature>50:
> >         print "the salad is properly cooked."
> > else:
> >         print "cook the salad some more."
>
> > ya i was trying to do that but when i told it what the spams
> > temperature was, it just turned off... well it wasnt working at all at
> > first until i realized that i hadnt been following the instructions
> > completely correctly and that i was supposed to type that code up in a
> > notepad then save and open with python... so ya thats when it asked me
> > what temperature the spam was and i typed a number then it just closed
> > itself... im not really sure what went wrong... itd be real nice if
> > someone would be like a mentor or something...
>
> I'm making a couple of assumptions here (correct me if I'm wrong):
>
> 1. You're using windows
> 2. You double clicked on the .py file
>
> What this does is open up a new terminal window and start execution of
> the program. The program will execute to completion and then the
> window will close automatically without waiting for you to tell it to
> (lovely isn't it?). To get around this you have a couple options:
>
> 1. Run the script from the command line
> 2. Put this at the end of the .py file: input('Press ENTER to continue')
>
> Ian

ok u used a bunch of fancy words in there... im not sure what a .py
file is... i am using windows... i dont know what a terminal window is
but im gonna asume that it is when you click the python thing... ya i
kinda understand what ur sayin but the thing is i wanted it to give
feedback to my question and why would it do that... hmmm very
confusing... im not sure how to run the script from the command
line... oh yeah the enter thing worked.  thanks for that... oh the
command line must be the lil black box... if i put it there then it
will give me a bunch of syntax this and error that kinda stuff...
thats why im putin it in the notepad and plus the tutorial said to...




More information about the Python-list mailing list