[Tutor] help with script

James Reynolds eire1130 at gmail.com
Wed Dec 28 02:40:58 CET 2011


On Tue, Dec 27, 2011 at 8:31 PM, <nicktocco at comcast.net> wrote:

> hello, my name is nick. i got python for software design by Allen B.
> Downey as a gift for christmas. i am completely new to programming and i am
> having trouble figuring out how to do an exercise concerning script..
> my problem
> 5
> x=5
> x+1
> im ok when it comes to using python so far. but it has asked me to put the
> problem into a script and run it. my question is how do i put that problem
> into a script and then how do i run it in python. im learning by myself at
> home so im having trouble figuring this out on my own. my os is win 7 i
> have python 2.7
> sorry about punctuation!
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
Follow these steps:

1. Start
2. All Programs
3. Python > Python 2.7 This will open "Python Shell"
4. Go to File, New window
5. A new window (untitled) will open. Save this to your desktop. Call it
"test" or "box" or "cloud"
5. You can now write python to a file. Go ahead and try it. You will need
to save it before you run it.
6. Do this by pressing F5 or by going up to run (after you save)

For example, by running this:

x=5
print x
print x+1
print x


will print this in the shell:

>>>
5
6
5
>>>

You can also just run from the shell itself, but I mostly use this for
simple one liners and stuff (which is what you are doing above)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111227/0fb3888a/attachment.html>


More information about the Tutor mailing list