if option==3:
active<>"on"
This will print "True" if active != 'on' and print "False" otherwise. <> has been deprecated so use "!=" instead. I think you want
if option==3:
active = "off"
Also you can simplify the following code.
if option<>1 or option<>2 or option<>3:
ondamenu()
##
## can also be written as
if option not in (1, 2, 3):
ondamenu()
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
The problem might be the double "input" on the previous line. You did not state that there was an error in the first post, and to get any more help you will have to post the exact error message as well.
if option==1:
whatsdaradius(input(input("enter a circumference: "))
if option==2:
radius2pie(input("enter a radius (ie.half diametre): "))
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
This may or may not be the problem but should be fixed.
if option<>1 or option<>2 or option<>3:
ondamenu()
## should be (otherwise option never changes)
option = ondamenu()
Then run the following code to see why you should code it as:
if option not in (1, 2, 3):
option = 1
if option<>1 or option<>2 or option<>3:
print "ondamenu()"
else:
print "not if"
if option =1 then it is not equal to 2, etc. You could code it as
if option<>1 and option<>2 and option<>3 also.
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714
pie=3.14159265358979323846264338327950288
I think the standard computer's floating point will only use something between
3.14159265359 and
3.1415926535897931
If you want more significant digits than that you will have to use Python's decimal module. http://docs.python.org/library/decimal.html
woooee
Nearly a Posting Maven
2,454 posts since Dec 2006
Reputation Points: 777
Solved Threads: 714