Skip to content
Discussion options

You must be logged in to vote

Try building a function that, instead of returning just True and False, returns an integer 0 or 1 or 2… depending on whether the angle is between 0° and 20°, or 20° and 40°, or 40° and 60°, and so forth. If you look at Skyfield's almanac.py, you'll see examples like seasons() and moon_phases() that use that approach:

https://github.com/skyfielders/python-skyfield/blob/master/skyfield/almanac.py#L59

Do you think the documentation at https://rhodesmill.org/skyfield/searches.html needs to be expanded to explain this approach?

Replies: 3 comments 9 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@skynoob-new
Comment options

@brandon-rhodes
Comment options

@skynoob-new
Comment options

@brandon-rhodes
Comment options

@skynoob-new
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by skynoob-new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants