Newbie questions

Trent Mick trentm at activestate.com
Tue Jun 13 00:33:56 EDT 2000


On Mon, Jun 12, 2000 at 09:10:35PM -0700, jim roush wrote:
> 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
> 
> 

It works for me. Sorry I am no help here.


BTW,
>>> import math
>>> math.pi
3.1415926535897931


Trent

-- 
Trent Mick
trentm at activestate.com




More information about the Python-list mailing list