ok, heres my first project, its a calculator that allows you to work out the area or cicumference of a circle, if you could have a look and give any improvemnts! many thanks
PHP Code:
## Tim Johnson, 20, oct##
## please contact me befor you display this on a site ##
choice = ""
while choice != "no":
print ("Do you want to work out the area or circumference? a/c")
texta = raw_input ()
if texta == "c" :
print ("Do you have the radius or diameter? r/d")
cdr = raw_input ()
if cdr == "r" :
cdrv = input ("Please enter your value,")
print cdrv
print ("Your circumference is"), [(cdrv*2)*3.14]
if cdr == "d":
cddv = input ("Please enter your value")
print cddv
print (" Your circumference is"), [cddv *3.14]
print (" Do you wish to close?")
cexit = raw_input ()
if cexit == "yes":
exit ()
else:
print (" Do you wish to close?")
textexit = raw_input ()
if textexit == "yes":
exit ()
if texta == "a" :
print (" Do you have the radius or diameter? r/d ")
adr = raw_input ()
if adr == "r" :
arav = input ("Please enter your value")
print arav
print ("Your area is") , [(arav*arav) * 3.14]
print ("Do you wish to close?")
raexit = raw_input ()
if raexit == "yes":
exit ()
if adr == "d" :
adav = input (" Please enter your value")
print adav
print ("Your area is"), [((adav/2)*(adav/2))*3.14]
print (" Do you wish to close?")
aexit = raw_input ()
if aexit == "yes":
exit ()
else:
print ("Error do you wish to quit?")
eexit = raw_input ()
if eexit == " yes":
exit ()