Skip to content
Advertisement

Python: Not being able to compare radians with pi values

I am writing an algorithm which should be able to determine in which quadrant a radian is based on two values that the user inputs. I think that the code is calculating the radian but I know that those values are not being compared to the pi values that I gave since I am not getting any output.

Code below:

JavaScript

Advertisement

Answer

First of all, you should rename degree to radians. The other problem is that you are assumed that all inputs are between 0 and 2pi. You should consider other inputs.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement