<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:10pt"><div><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;">How can I get Python to represent a value of a function in degrees, i.e., with values between 0 and 360, by taking the (non-integer) function expression mod 360?</span><br style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;"><br style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;"><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;">That is, I have a function with non-integer values, called Longitude, which is defined in terms of the variable t. I just want to plot Longitude modulo 360 for a range
 of values of t: that is, for every value of t, plot the integer-AND-fraction remainder after dividing Longitude by 360.</span><br style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;"><br style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;"><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;">But Python (in Sage) apparently won't let me use the int function or the // operator on functions defined in terms of a variable: I get a "cannot evaluate symbolic expression numerically" TypeError. How do I do this? There must be a simple way to tell Python that I want it to compute the value of Longitude for a given value of t and then take the integer-and-fraction remainder from dividing by 360.</span></div><div><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma,
 Helvetica, Arial, sans-serif; line-height: 18px;"><br></span></div><div><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;"><br></span></div><div><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;">Many thanks,</span></div><div><span style="color: rgb(73, 73, 73); font-family: Verdana, Tahoma, Helvetica, Arial, sans-serif; line-height: 18px;">Kim</span></div></div></body></html>