simple simple grrr

import math
import time

while 1:
	
	r = input("Enter Circle Radius --> ")
	
	circ = (pow(r,2)) * 3.14
	print ''
	print 'The circumferance of a circle with a radius of ',r,'is',circ,'.'
	print ''
	
	time.sleep(2)
	print ''
	print ''
	print ''
	print "Loop Start or Exit? 'l' or 'e'."
	print ''
	choice = input("--> ")
	
	if choice == l:
		
		time.sleep(2)
		os.startfile("C:\Documents and Settings\Sameer\Desktop\Circumferance Finder.py",r)
		quit()
	
	if choice == e:
		
		quit()
Member Avatar for masterofpuppets

hi,
you can just continue the loop if the user enters 1 instead of reloading the program again, like this:

import math
import time
 
while True:
 
    r = input( "Enter Circle Radius --> " )

    circ = ( pow( r, 2 ) ) * 3.14
    print ''
    print 'The circumferance of a circle with a radius of ',r,'is',circ,'.'
    print ''

    time.sleep( 2 )
    print ''
    print ''
    print ''
    print "Loop Start or Exit? 'l' or 'e'."
    print ''
    # For Python2 change this to raw_input() to get input as a string
    choice = raw_input( "--> " )

    if choice == "l":
        time.sleep( 2 )
    elif choice == "e":
        break

hope this helps :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.