Newbie questions

F. G. Brown fgbrown at ionet.net
Tue Jun 13 01:21:52 EDT 2000


Jim,
I'm as newbie as they come, but I would have to say that there is nothing
wrong with
your formula.  If you are using just the basic Python( 3 hacks >>> on a
black screen) and have saved the program where Python knows where it's at,
such as by the path or pythonpath statement (not sure how this would work in
NT (argh! newbie)) it should work.  I cut and pasted your lines and saved
them to a file called rad.py then at the Python command line did a "import
rad".  The question came up "Enter is the radius:" I said 22 and it said
"138.2 yada yada.
Sorry about the ramble, but hope I helped.  Everyone here has been helpful
to me, I had to jump at the opportunity.

have fun,
Fred

"jim roush" <jar at mminternet.com> wrote in message
news:q9abks07oq5q327ijvf6ejgf91kh5o5aci at 4ax.com...
> I'm just learning Python.  The following code does not work.  It's
> supposed to calculate the circumference after the user enters the
> radius.  The program displays the prompt, but when I enter the radius
> and the press enter, nothing happens.
>
> FYI, I'm using Python 1.5.2 on WinNT.
>
> pi = 3.141592654
> radius = input("Enter is the radius: ")
> circ = 2 * pi * radius
> print circ
>
>
> jar at mminternet.com
> James A Roush





More information about the Python-list mailing list