Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- i = 0
- while( i<3 ) :
- print "x: "
- x = float(raw_input())
- print "y: "
- y = float(raw_input())
- # condition 1
- if( x != 0 and (abs(x) > abs(y)) ) :
- z = math.sin((x+y) / y)
- print "z = sin((x+y) / y) = " + str(z)
- # condition 2
- elif( x != 0 and (abs(x) <= abs(y)) ) :
- z = math.arccos(x / y)
- print "z = arccos(x / y) = " + str(z)
- # condition 3
- else :
- print "z = pi = " + str(math.pi)
- i = i+1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement