etrig 1.0.xx

Oct. 17th, 2004 @ 11:51 am


Comments on this post list the source code and revision numbers of etrig.py 1.0.xx Current Mood: aggravated

 From:  iie 

Date:  October 17th, 2004 08:52 am (UTC) 

  etrig 1.0.00  (Link) 

# Etrig ver 1.0.00
print ""
print " ETrig 1.0 "
print ""
print " "
# Print out the intro:
print ""
print " Use the form: "
print " \ "
print " A \ "
print "  \C "
print "  \ "
print " ____T "
print " B "
print " "
print " A,B,&C are sides; "
print " enter side values in "
print " the form: '3.' rather "
print " than '3' "
print " T is angle Theta "
print ""
print " "
# Get the side lengths:
a = input("A?")
b = input("B?")
c = input("C?")
print " "
# Check triangle to be possible:
# Using a^2+b^2=c^2
d = a * a
e = b * b
f = c * c
g = d + e
if g==f:
print "valid triangle entered"
else:
print "INVALID TRIANGLE ENTERED"
print "sug: recheck side lengths"
#FIXME (make this point wrap around to 0)
#Calculate six functions:
sin = a / c
cos = b / c
tan = a / b
csc = c / a
sec = c / b
ctn = b / a
#print results:
print " "
print "sine =",a,"/",c," or ",sin
print "cosine =",b,"/",c," or ",cos
print "tangent =",a,"/",b," or ",tan
print "cosecant =",c,"/",a," or ",csc
print "secant =",c,"/",b," or ",sec
print "cotangent=",b,"/",a," or ",ctn
 From:  iie 

Date:  October 17th, 2004 08:54 am (UTC) 

  etrig 1.0.01  (Link) 

# Etrig ver 1.0.01
print ""
print " ETrig 1.0 "
print ""
print " "
# Print out the intro:
print ""
print " Use the form: "
print " \ "
print " A \ "
print "  \C "
print "  \ "
print " ____T "
print " B "
print " "
print " A,B,&C are sides; "
print " T is angle Theta "
print ""
print " "
# Get the side lengths:
a = input("A?")
b = input("B?")
c = input("C?")
# Check triangle to be possible:
#Enable fpn
a = a + .0
b = b + .0
c = c + .0
# Use a^2+b^2=c^2
d = a * a
e = b * b
f = c * c
g = d + e
print " "
if g==f:
print "valid triangle entered"
else:
print "INVALID TRIANGLE ENTERED"
print "sug: recheck side lengths"
#Calculate six functions:
sin = a / c
cos = b / c
tan = a / b
csc = c / a
sec = c / b
ctn = b / a
#print results:
print " "
print "sine =",a,"/",c," or ",sin
print "cosine =",b,"/",c," or ",cos
print "tangent =",a,"/",b," or ",tan
print "cosecant =",c,"/",a," or ",csc
print "secant =",c,"/",b," or ",sec
print "cotangent=",b,"/",a," or ",ctn
 From:  iie 

Date:  October 17th, 2004 08:56 am (UTC) 

  Re: etrig 1.0.01  (Link) 

lets see if we can keep it from closing the dos window automatically after it prints the returned values From:  (Anonymous) 

Date:  October 24th, 2004 05:45 pm (UTC) 

  How to make it wait before it closes windows  (Link) 

# Etrig ver 1.0.01 print "" print " ETrig 1.0 " print "" print " " # Print out the intro: print "" print " Use the form: " print " \ " print " A \ " print "  \C " print "  \ " print " ____T " print " B " print " " print " A,B,&C are sides; " print " T is angle Theta " print "" print " " # Get the side lengths: a = input("A?") b = input("B?") c = input("C?") # Check triangle to be possible: #Enable fpn a = a + .0 b = b + .0 c = c + .0 # Use a^2+b^2=c^2 d = a * a e = b * b f = c * c g = d + e print " " if g==f: print "valid triangle entered" else: print "INVALID TRIANGLE ENTERED" print "sug: recheck side lengths" #Calculate six functions: sin = a / c cos = b / c tan = a / b csc = c / a sec = c / b ctn = b / a #print results: print " " print "sine =",a,"/",c," or ",sin print "cosine =",b,"/",c," or ",cos print "tangent =",a,"/",b," or ",tan print "cosecant =",c,"/",a," or ",csc print "secant =",c,"/",b," or ",sec print "cotangent=",b,"/",a," or ",ctn import time time.sleep(3.0) You can change the sleep time to how ever many seconds you want... Im not sure how to make it wait indefinately. By the way,l this is werther.  From:  iie 

Date:  October 26th, 2004 06:04 pm (UTC) 

  Re: How to make it wait before it closes windows  (Link) 

** from time import sleep ** ... i think

